EC2インスタンスのユーザーデータ内のdnfコマンドやyumコマンドが失敗する場合の緩和策を考えてみた

EC2インスタンスのユーザーデータ内のdnfコマンドやyumコマンドが失敗する場合の緩和策を考えてみた

ユーザーデータの処理が正常に完了したのかチェックする仕組みを導入しよう
Clock Icon2024.04.27

ユーザーデータでパッケージのインストールをしようとすると失敗するんだが

こんにちは、のんピ(@non____97)です。

皆さんはEC2インスタンスのユーザーデータでdnfコマンドやyumコマンドが失敗したことはありますか? 私はあります。

具体的にはユーザーデータでdnf upgradednf install パッケージ名を実行すると、以下のようにRPM: error: can't create transaction lock on /var/lib/rpm/.rpm.lock (Resource temporarily unavailable)とログが出力されます。

$ dnf upgrade -y --releasever=latest
Amazon Linux 2023 repository                     30 MB/s |  23 MB     00:00
Amazon Linux 2023 Kernel Livepatch repository   422 kB/s | 165 kB     00:00
Dependencies resolved.
================================================================================
 Package                    Arch   Version                    Repository   Size
================================================================================
Installing:
 kernel                     x86_64 6.1.84-99.169.amzn2023     amazonlinux  31 M
Upgrading:
 amazon-linux-repo-s3       noarch 2023.4.20240416-1.amzn2023 amazonlinux  16 k
 amazon-ssm-agent           x86_64 3.3.131.0-1.amzn2023       amazonlinux  24 M
 c-ares                     x86_64 1.19.0-1.amzn2023.0.1      amazonlinux 110 k
.
.
(中略)
.
.
 python3-systemd            x86_64 235-51.amzn2023.0.2        amazonlinux  91 k
 sssd-nfs-idmap             x86_64 2.9.4-1.amzn2023.0.1       amazonlinux  35 k

Transaction Summary
================================================================================
Install   4 Packages
Upgrade  62 Packages

Total download size: 106 M
Downloading Packages:
(1/66): libsss_sudo-2.9.4-1.amzn2023.0.1.x86_64 235 kB/s |  31 kB     00:00
(2/66): sssd-nfs-idmap-2.9.4-1.amzn2023.0.1.x86 2.1 MB/s |  35 kB     00:00
(3/66): amazon-linux-repo-s3-2023.4.20240416-1. 1.0 MB/s |  16 kB     00:00
.
.
(中略)
.
.
(64/66): yum-4.14.0-1.amzn2023.0.4.noarch.rpm   2.2 MB/s |  37 kB     00:00
(65/66): util-linux-core-2.37.4-1.amzn2023.0.4. 9.1 MB/s | 432 kB     00:00
(66/66): util-linux-2.37.4-1.amzn2023.0.4.x86_6  11 MB/s | 2.2 MB     00:00
--------------------------------------------------------------------------------
Total                                            38 MB/s | 106 MB     00:02
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
RPM: error: can't create transaction lock on /var/lib/rpm/.rpm.lock (Resource temporarily unavailable)
The downloaded packages were saved in cache until the next successful transaction.
You can remove cached packages by executing 'dnf clean packages'.
Error: Could not run transaction.

ユーザーデータの中でパッケージを最新化したり、パッケージをインストールするのはよくある処理だと考えます。そんな時にこのような事象が発生してしまうと、後続の処理に影響が出そうです。

この事象の困るところは確実に再現するシチュエーションが不明という点です。EC2インスタンスを何回か起動すると、「稀によく」発生します。

先述のログはAmazon Linux 2023(ami-0f403e3180720dd7e)のものですが、RHEL 8やRHEL 9のEC2インスタンスでも同様のログが出力された経験があります。そのため、OS固有の事象ではなさそうです。

この事象について調べていると、re:PostやGitHubのIssueに同様のエラーメッセージについての投稿があります。

上述の投稿を踏まえて、私なりの緩和策を紹介します。

いきなりまとめ

  • EC2インスタンスのユーザーデータでdnfコマンドやyumコマンドが失敗することがある
  • 失敗の直接原因はdnf/yum実行時にパッケージ更新操作が競合したことによるもの
    • 検証時の根本原因は、EC2インスタンス起動時にSSM Agentの自動アップデートが裏側で走っていたため
    • SSM Agentの自動アップデートはEC2インスタンスが起動したタイミングで自動実行される
  • 以下のような緩和策で対応することになる
    • ユーザーデータの中でdnfコマンドが失敗したらリトライ処理を組み込む
    • (CloudFormation限定) cfn-signalで異常終了を検出し、スタックロールバック後に再度スタックをデプロイする
    • パッケージの更新やインストールをしたAMIを作成し、そのAMIを使ってEC2インスタンスを起動する

事象発生時のログと設定ファイルの確認

/var/log/cloud-init-output.log

事象発生時のログを確認しましょう。

起動したEC2インスタンスはAmazon Linux 2023(ami-0f403e3180720dd7e)です。

起動する際に指定したユーザーデータは以下のとおりです。

#!/bin/bash

# -x to display the command to be executed
set -xe

dnf upgrade -y \
  --releasever=latest

まずは、cloud-initによって実行された処理が記録されるログファイルである/var/log/cloud-init-output.logを確認します。

$ sudo cat /var/log/cloud-init-output.log
Cloud-init v. 22.2.2 running 'init' at Fri, 26 Apr 2024 11:06:52 +0000. Up 8.74 seconds.
ci-info: ++++++++++++++++++++++++++++++++++++++Net device info+++++++++++++++++++++++++++++++++++++++
ci-info: +--------+------+-----------------------------+---------------+--------+-------------------+
ci-info: | Device |  Up  |           Address           |      Mask     | Scope  |     Hw-Address    |
ci-info: +--------+------+-----------------------------+---------------+--------+-------------------+
ci-info: |  ens5  | True |         172.31.18.56        | 255.255.240.0 | global | 0a:ff:e5:36:11:b9 |
ci-info: |  ens5  | True | fe80::8ff:e5ff:fe36:11b9/64 |       .       |  link  | 0a:ff:e5:36:11:b9 |
ci-info: |   lo   | True |          127.0.0.1          |   255.0.0.0   |  host  |         .         |
ci-info: |   lo   | True |           ::1/128           |       .       |  host  |         .         |
ci-info: +--------+------+-----------------------------+---------------+--------+-------------------+
ci-info: ++++++++++++++++++++++++++++++Route IPv4 info++++++++++++++++++++++++++++++
ci-info: +-------+-------------+-------------+-----------------+-----------+-------+
ci-info: | Route | Destination |   Gateway   |     Genmask     | Interface | Flags |
ci-info: +-------+-------------+-------------+-----------------+-----------+-------+
ci-info: |   0   |   0.0.0.0   | 172.31.16.1 |     0.0.0.0     |    ens5   |   UG  |
ci-info: |   1   |  172.31.0.2 | 172.31.16.1 | 255.255.255.255 |    ens5   |  UGH  |
ci-info: |   2   | 172.31.16.0 |   0.0.0.0   |  255.255.240.0  |    ens5   |   U   |
ci-info: |   3   | 172.31.16.1 |   0.0.0.0   | 255.255.255.255 |    ens5   |   UH  |
ci-info: +-------+-------------+-------------+-----------------+-----------+-------+
ci-info: +++++++++++++++++++Route IPv6 info+++++++++++++++++++
ci-info: +-------+-------------+---------+-----------+-------+
ci-info: | Route | Destination | Gateway | Interface | Flags |
ci-info: +-------+-------------+---------+-----------+-------+
ci-info: |   0   |  fe80::/64  |    ::   |    ens5   |   U   |
ci-info: |   2   |    local    |    ::   |    ens5   |   U   |
ci-info: |   3   |  multicast  |    ::   |    ens5   |   U   |
ci-info: +-------+-------------+---------+-----------+-------+
Generating public/private ed25519 key pair.
Your identification has been saved in /etc/ssh/ssh_host_ed25519_key
Your public key has been saved in /etc/ssh/ssh_host_ed25519_key.pub
The key fingerprint is:
SHA256:E38f4fls31GBZpPfW2ZkwSN0f87lmjzwIFGp6Fx5Rhc root@ip-172-31-18-56.ec2.internal
The key's randomart image is:
+--[ED25519 256]--+
|            ooE+ |
|           .o.=oo|
|        ...+ Bo.B|
|        .o+.=.oO=|
|       oS.oo+ +.X|
|        o. o * O+|
|              Bo+|
|               o+|
|                o|
+----[SHA256]-----+
Generating public/private ecdsa key pair.
Your identification has been saved in /etc/ssh/ssh_host_ecdsa_key
Your public key has been saved in /etc/ssh/ssh_host_ecdsa_key.pub
The key fingerprint is:
SHA256:CBlTx4OrbcA7UqyFqiC1+HK8Hqm19e8Xtgzbe2qadb8 root@ip-172-31-18-56.ec2.internal
The key's randomart image is:
+---[ECDSA 256]---+
|    o..o.        |
|     +..o        |
|   +o  . .       |
|  o *...         |
| + = =. S        |
|= +.+ o . o      |
|+o+..o   *.o.    |
|oo++ .  .o*...   |
|.++.  .o=+o+  E. |
+----[SHA256]-----+
Cloud-init v. 22.2.2 running 'modules:config' at Fri, 26 Apr 2024 11:06:55 +0000. Up 12.32 seconds.
Cloud-init v. 22.2.2 running 'modules:final' at Fri, 26 Apr 2024 11:06:56 +0000. Up 13.49 seconds.
+ dnf upgrade -y --releasever=latest
Amazon Linux 2023 repository                     30 MB/s |  23 MB     00:00
Amazon Linux 2023 Kernel Livepatch repository   422 kB/s | 165 kB     00:00
Dependencies resolved.
================================================================================
 Package                    Arch   Version                    Repository   Size
================================================================================
Installing:
 kernel                     x86_64 6.1.84-99.169.amzn2023     amazonlinux  31 M
Upgrading:
 amazon-linux-repo-s3       noarch 2023.4.20240416-1.amzn2023 amazonlinux  16 k
 amazon-ssm-agent           x86_64 3.3.131.0-1.amzn2023       amazonlinux  24 M
 c-ares                     x86_64 1.19.0-1.amzn2023.0.1      amazonlinux 110 k
.
.
(中略)
.
.
 util-linux                 x86_64 2.37.4-1.amzn2023.0.4      amazonlinux 2.2 M
 util-linux-core            x86_64 2.37.4-1.amzn2023.0.4      amazonlinux 432 k
 yum                        noarch 4.14.0-1.amzn2023.0.4      amazonlinux  37 k
Installing dependencies:
 libsss_sudo                x86_64 2.9.4-1.amzn2023.0.1       amazonlinux  31 k
 python3-systemd            x86_64 235-51.amzn2023.0.2        amazonlinux  91 k
 sssd-nfs-idmap             x86_64 2.9.4-1.amzn2023.0.1       amazonlinux  35 k

Transaction Summary
================================================================================
Install   4 Packages
Upgrade  62 Packages

Total download size: 106 M
Downloading Packages:
(1/66): libsss_sudo-2.9.4-1.amzn2023.0.1.x86_64 235 kB/s |  31 kB     00:00
(2/66): sssd-nfs-idmap-2.9.4-1.amzn2023.0.1.x86 2.1 MB/s |  35 kB     00:00
(3/66): amazon-linux-repo-s3-2023.4.20240416-1. 1.0 MB/s |  16 kB     00:00
.
.
(中略)
.
.
(64/66): yum-4.14.0-1.amzn2023.0.4.noarch.rpm   2.2 MB/s |  37 kB     00:00
(65/66): util-linux-core-2.37.4-1.amzn2023.0.4. 9.1 MB/s | 432 kB     00:00
(66/66): util-linux-2.37.4-1.amzn2023.0.4.x86_6  11 MB/s | 2.2 MB     00:00
--------------------------------------------------------------------------------
Total                                            38 MB/s | 106 MB     00:02
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
RPM: error: can't create transaction lock on /var/lib/rpm/.rpm.lock (Resource temporarily unavailable)
The downloaded packages were saved in cache until the next successful transaction.
You can remove cached packages by executing 'dnf clean packages'.
Error: Could not run transaction.
2024-04-26 11:07:25,849 - cc_scripts_user.py[WARNING]: Failed to run module scripts-user (scripts in /var/lib/cloud/instance/scripts)
2024-04-26 11:07:25,849 - util.py[WARNING]: Running module scripts-user (<module 'cloudinit.config.cc_scripts_user' from '/usr/lib/python3.9/site-packages/cloudinit/config/cc_scripts_user.py'>) failed
Cloud-init v. 22.2.2 finished at Fri, 26 Apr 2024 11:07:25 +0000. Datasource DataSourceEc2.  Up 42.62 seconds

/var/lib/rpm/.rpm.lockのトランザクションロックを確立できないようです。

/var/log/dnf.rpm.log

それでは、裏側でrpmについての処理が実行されていたのか判断するために、/var/log/dnf.rpm.logを確認します。

$ sudo cat /var/log/dnf.rpm.log
2024-03-01T22:04:49Z INFO --- logging initialized ---
2024-03-01T22:05:20Z SUBDEBUG Installed: libgcc-11.4.1-2.amzn2023.0.2.x86_64
2024-03-01T22:05:20Z SUBDEBUG Installed: libgcc-11.4.1-2.amzn2023.0.2.x86_64
.
.
(中略)
.
.
2024-03-01T22:06:23Z SUBDEBUG Installed: rootfiles-8.1-29.amzn2023.0.2.noarch
2024-03-01T22:06:23Z SUBDEBUG Installed: rootfiles-8.1-29.amzn2023.0.2.noarch
2024-03-01T22:06:23Z INFO grub2-probe: error: failed to get canonical path of `/dev/mapper/loop6p1'.
warning: %posttrans(grub2-common-1:2.06-61.amzn2023.0.11.noarch) scriptlet failed, exit status 1

2024-03-01T22:06:23Z ERROR Error in POSTTRANS scriptlet in rpm package grub2-common
2024-03-01T22:06:31Z INFO grub2-probe: error: failed to get canonical path of `/dev/mapper/loop6p1'.
No path or device is specified.
Usage: grub2-probe [OPTION...] [OPTION]... [PATH|DEVICE]
Try 'grub2-probe --help' or 'grub2-probe --usage' for more information.
Checking Secure Boot revocations...
efivar: show variable: Function not implemented
Not a UEFI instance

2024-03-01T22:06:31Z INFO grub2-probe: error: failed to get canonical path of `/dev/mapper/loop6p1'.
warning: %posttrans(grub2-efi-x64-ec2-1:2.06-61.amzn2023.0.11.x86_64) scriptlet failed, exit status 1

2024-03-01T22:06:31Z ERROR Error in POSTTRANS scriptlet in rpm package grub2-efi-x64-ec2
2024-03-01T22:06:46Z INFO --- logging initialized ---
2024-04-26T11:06:58+0000 INFO --- logging initialized ---
2024-04-26T11:07:26+0000 INFO --- logging initialized ---
2024-04-26T11:07:35+0000 INFO --- logging initialized ---

EC2インスタンスを起動した日時は2024/4/26 11:05ごろです。この日時ごろに記録された関連するようなログはありません。

/var/log/cloud-init.log

より詳細なログを確認するために/var/log/cloud-init.logも表示してみます。

/var/log/cloud-init.log (長すぎるので折りたたみ)
$ sudo cat /var/log/cloud-init.log
2024-04-26 11:06:52,170 - util.py[DEBUG]: Cloud-init v. 22.2.2 running 'init' at Fri, 26 Apr 2024 11:06:52 +0000. Up 8.74 seconds.
2024-04-26 11:06:52,170 - main.py[DEBUG]: No kernel command line url found.
2024-04-26 11:06:52,170 - main.py[DEBUG]: Closing stdin.
2024-04-26 11:06:52,171 - util.py[DEBUG]: Restoring selinux mode for /var/lib/cloud (recursive=False)
2024-04-26 11:06:52,172 - util.py[DEBUG]: Restoring selinux mode for /var/lib/cloud (recursive=True)
2024-04-26 11:06:52,190 - util.py[DEBUG]: Restoring selinux mode for /var/lib/cloud/scripts (recursive=False)
2024-04-26 11:06:52,191 - util.py[DEBUG]: Restoring selinux mode for /var/lib/cloud/scripts (recursive=True)
2024-04-26 11:06:52,198 - util.py[DEBUG]: Restoring selinux mode for /var/lib/cloud/scripts/per-instance (recursive=False)
2024-04-26 11:06:52,199 - util.py[DEBUG]: Restoring selinux mode for /var/lib/cloud/scripts (recursive=True)
2024-04-26 11:06:52,205 - util.py[DEBUG]: Restoring selinux mode for /var/lib/cloud/scripts/per-once (recursive=False)
2024-04-26 11:06:52,206 - util.py[DEBUG]: Restoring selinux mode for /var/lib/cloud/scripts (recursive=True)
2024-04-26 11:06:52,224 - util.py[DEBUG]: Restoring selinux mode for /var/lib/cloud/scripts/per-boot (recursive=False)
2024-04-26 11:06:52,225 - util.py[DEBUG]: Restoring selinux mode for /var/lib/cloud/scripts (recursive=True)
2024-04-26 11:06:52,246 - util.py[DEBUG]: Restoring selinux mode for /var/lib/cloud/scripts/vendor (recursive=False)
2024-04-26 11:06:52,248 - util.py[DEBUG]: Restoring selinux mode for /var/lib/cloud (recursive=True)
2024-04-26 11:06:52,275 - util.py[DEBUG]: Restoring selinux mode for /var/lib/cloud/seed (recursive=False)
2024-04-26 11:06:52,276 - util.py[DEBUG]: Restoring selinux mode for /var/lib/cloud (recursive=True)
2024-04-26 11:06:52,305 - util.py[DEBUG]: Restoring selinux mode for /var/lib/cloud/instances (recursive=False)
2024-04-26 11:06:52,306 - util.py[DEBUG]: Restoring selinux mode for /var/lib/cloud (recursive=True)
2024-04-26 11:06:52,334 - util.py[DEBUG]: Restoring selinux mode for /var/lib/cloud/handlers (recursive=False)
2024-04-26 11:06:52,335 - util.py[DEBUG]: Restoring selinux mode for /var/lib/cloud (recursive=True)
2024-04-26 11:06:52,378 - util.py[DEBUG]: Restoring selinux mode for /var/lib/cloud/sem (recursive=False)
2024-04-26 11:06:52,379 - util.py[DEBUG]: Restoring selinux mode for /var/lib/cloud/data (recursive=False)
2024-04-26 11:06:52,380 - util.py[DEBUG]: Restoring selinux mode for /run/cloud-init (recursive=True)
2024-04-26 11:06:52,381 - util.py[DEBUG]: Restoring selinux mode for /run/cloud-init/sem (recursive=False)
2024-04-26 11:06:52,382 - util.py[DEBUG]: Writing to /var/log/cloud-init.log - ab: [640] 0 bytes
2024-04-26 11:06:52,384 - util.py[DEBUG]: Restoring selinux mode for /var/log/cloud-init.log (recursive=False)
2024-04-26 11:06:52,384 - util.py[DEBUG]: Restoring selinux mode for /var/log/cloud-init.log (recursive=False)
2024-04-26 11:06:52,386 - util.py[DEBUG]: Changing the ownership of /var/log/cloud-init.log to 0:4
2024-04-26 11:06:52,386 - util.py[DEBUG]: Writing to /var/lib/cloud/data/python-version - wb: [644] 3 bytes
2024-04-26 11:06:52,387 - util.py[DEBUG]: Restoring selinux mode for /var/lib/cloud/data/python-version (recursive=False)
2024-04-26 11:06:52,388 - util.py[DEBUG]: Restoring selinux mode for /var/lib/cloud/data/python-version (recursive=False)
2024-04-26 11:06:52,389 - subp.py[DEBUG]: Running command ['ip', '--json', 'addr'] with allowed return codes [0] (shell=False, capture=True)
2024-04-26 11:06:52,399 - subp.py[DEBUG]: Running command ['ip', '-o', 'route', 'list'] with allowed return codes [0] (shell=False, capture=True)
2024-04-26 11:06:52,409 - subp.py[DEBUG]: Running command ['ip', '--oneline', '-6', 'route', 'list', 'table', 'all'] with allowed return codes [0, 1] (shell=False, capture=True)
2024-04-26 11:06:52,420 - handlers.py[DEBUG]: start: init-network/check-cache: attempting to read from cache [trust]
2024-04-26 11:06:52,420 - util.py[DEBUG]: Reading from /var/lib/cloud/instance/obj.pkl (quiet=False)
2024-04-26 11:06:52,420 - stages.py[DEBUG]: no cache found
2024-04-26 11:06:52,420 - handlers.py[DEBUG]: finish: init-network/check-cache: SUCCESS: no cache found
2024-04-26 11:06:52,420 - util.py[DEBUG]: Attempting to remove /var/lib/cloud/instance
2024-04-26 11:06:52,468 - stages.py[DEBUG]: Using distro class <class 'cloudinit.distros.amazon.Distro'>
2024-04-26 11:06:52,468 - __init__.py[DEBUG]: Looking for data source in: ['Ec2', 'None'], via packages ['', 'cloudinit.sources'] that matches dependencies ['FILESYSTEM', 'NETWORK']
2024-04-26 11:06:52,481 - __init__.py[DEBUG]: Searching for network data source in: ['DataSourceEc2', 'DataSourceNone']
2024-04-26 11:06:52,482 - handlers.py[DEBUG]: start: init-network/search-Ec2: searching for network data from DataSourceEc2
2024-04-26 11:06:52,482 - __init__.py[DEBUG]: Seeing if we can get any data from <class 'cloudinit.sources.DataSourceEc2.DataSourceEc2'>
2024-04-26 11:06:52,482 - __init__.py[DEBUG]: Update datasource metadata and network config due to events: boot-new-instance
2024-04-26 11:06:52,482 - util.py[DEBUG]: Reading from /sys/hypervisor/uuid (quiet=False)
2024-04-26 11:06:52,482 - dmi.py[DEBUG]: querying dmi data /sys/class/dmi/id/product_uuid
2024-04-26 11:06:52,482 - dmi.py[DEBUG]: querying dmi data /sys/class/dmi/id/product_serial
2024-04-26 11:06:52,483 - dmi.py[DEBUG]: querying dmi data /sys/class/dmi/id/chassis_asset_tag
2024-04-26 11:06:52,483 - dmi.py[DEBUG]: querying dmi data /sys/class/dmi/id/sys_vendor
2024-04-26 11:06:52,483 - DataSourceEc2.py[DEBUG]: strict_mode: warn, cloud_name=aws cloud_platform=ec2
2024-04-26 11:06:52,483 - util.py[DEBUG]: Skipping DNS checks of IP address 169.254.169.254
2024-04-26 11:06:52,483 - util.py[DEBUG]: Resolving URL: http://169.254.169.254:80 took 0.000 seconds
2024-04-26 11:06:52,483 - util.py[DEBUG]: Skipping DNS checks of IP address fd00:ec2::254
2024-04-26 11:06:52,483 - util.py[DEBUG]: Resolving URL: http://[fd00:ec2::254]:80 took 0.000 seconds
2024-04-26 11:06:52,483 - DataSourceEc2.py[DEBUG]: Fetching Ec2 IMDSv2 API Token
2024-04-26 11:06:52,484 - url_helper.py[DEBUG]: [0/1] open 'http://169.254.169.254:80/latest/api/token' with {'url': 'http://169.254.169.254:80/latest/api/token', 'allow_redirects': True, 'method': 'PUT', 'timeout': 50.0, 'headers': {'User-Agent': 'Cloud-Init/22.2.2', 'X-aws-ec2-metadata-token-ttl-seconds': 'REDACTED'}} configuration
2024-04-26 11:06:52,499 - url_helper.py[DEBUG]: Read from http://169.254.169.254:80/latest/api/token (200, 56b) after 1 attempts
2024-04-26 11:06:52,499 - DataSourceEc2.py[DEBUG]: Using metadata source: 'http://169.254.169.254:80'
2024-04-26 11:06:52,500 - url_helper.py[DEBUG]: [0/1] open 'http://169.254.169.254:80/2021-03-23/meta-data/instance-id' with {'url': 'http://169.254.169.254:80/2021-03-23/meta-data/instance-id', 'allow_redirects': True, 'method': 'GET', 'headers': {'User-Agent': 'Cloud-Init/22.2.2', 'X-aws-ec2-metadata-token': 'REDACTED'}} configuration
2024-04-26 11:06:52,503 - url_helper.py[DEBUG]: Read from http://169.254.169.254:80/2021-03-23/meta-data/instance-id (200, 19b) after 1 attempts
2024-04-26 11:06:52,503 - DataSourceEc2.py[DEBUG]: Found preferred metadata version 2021-03-23
2024-04-26 11:06:52,503 - url_helper.py[DEBUG]: [0/6] open 'http://169.254.169.254:80/2021-03-23/user-data' with {'url': 'http://169.254.169.254:80/2021-03-23/user-data', 'allow_redirects':True, 'method': 'GET', 'timeout': 5.0, 'headers': {'X-aws-ec2-metadata-token': 'REDACTED'}} configuration
2024-04-26 11:06:52,506 - url_helper.py[DEBUG]: Read from http://169.254.169.254:80/2021-03-23/user-data (200, 103b) after 1 attempts
2024-04-26 11:06:52,506 - url_helper.py[DEBUG]: [0/6] open 'http://169.254.169.254:80/2021-03-23/meta-data/' with {'url': 'http://169.254.169.254:80/2021-03-23/meta-data/', 'allow_redirects': True, 'method': 'GET', 'timeout': 5.0, 'headers': {'X-aws-ec2-metadata-token': 'REDACTED'}} configuration
2024-04-26 11:06:52,510 - url_helper.py[DEBUG]: Read from http://169.254.169.254:80/2021-03-23/meta-data/ (200, 331b) after 1 attempts
2024-04-26 11:06:52,510 - url_helper.py[DEBUG]: [0/6] open 'http://169.254.169.254:80/2021-03-23/meta-data/block-device-mapping/' with {'url': 'http://169.254.169.254:80/2021-03-23/meta-data/block-device-mapping/', 'allow_redirects': True, 'method': 'GET', 'timeout': 5.0, 'headers': {'X-aws-ec2-metadata-token': 'REDACTED'}} configuration
2024-04-26 11:06:52,519 - url_helper.py[DEBUG]: Read from http://169.254.169.254:80/2021-03-23/meta-data/block-device-mapping/ (200, 8b) after 1 attempts
2024-04-26 11:06:52,519 - url_helper.py[DEBUG]: [0/6] open 'http://169.254.169.254:80/2021-03-23/meta-data/block-device-mapping/ami' with {'url': 'http://169.254.169.254:80/2021-03-23/meta-data/block-device-mapping/ami', 'allow_redirects': True, 'method': 'GET', 'timeout': 5.0, 'headers': {'X-aws-ec2-metadata-token': 'REDACTED'}} configuration
2024-04-26 11:06:52,529 - url_helper.py[DEBUG]: Read from http://169.254.169.254:80/2021-03-23/meta-data/block-device-mapping/ami (200, 4b) after 1 attempts
2024-04-26 11:06:52,529 - url_helper.py[DEBUG]: [0/6] open 'http://169.254.169.254:80/2021-03-23/meta-data/block-device-mapping/root' with {'url': 'http://169.254.169.254:80/2021-03-23/meta-data/block-device-mapping/root', 'allow_redirects': True, 'method': 'GET', 'timeout': 5.0, 'headers': {'X-aws-ec2-metadata-token': 'REDACTED'}} configuration
2024-04-26 11:06:52,539 - url_helper.py[DEBUG]: Read from http://169.254.169.254:80/2021-03-23/meta-data/block-device-mapping/root (200, 9b) after 1 attempts
2024-04-26 11:06:52,539 - url_helper.py[DEBUG]: [0/6] open 'http://169.254.169.254:80/2021-03-23/meta-data/events/' with {'url': 'http://169.254.169.254:80/2021-03-23/meta-data/events/', 'allow_redirects': True, 'method': 'GET', 'timeout': 5.0, 'headers': {'X-aws-ec2-metadata-token': 'REDACTED'}} configuration
2024-04-26 11:06:52,549 - url_helper.py[DEBUG]: Read from http://169.254.169.254:80/2021-03-23/meta-data/events/ (200, 12b) after 1 attempts
2024-04-26 11:06:52,549 - url_helper.py[DEBUG]: [0/6] open 'http://169.254.169.254:80/2021-03-23/meta-data/events/maintenance/' with {'url': 'http://169.254.169.254:80/2021-03-23/meta-data/events/maintenance/', 'allow_redirects': True, 'method': 'GET', 'timeout': 5.0, 'headers': {'X-aws-ec2-metadata-token': 'REDACTED'}} configuration
2024-04-26 11:06:52,552 - url_helper.py[DEBUG]: Read from http://169.254.169.254:80/2021-03-23/meta-data/events/maintenance/ (200, 17b) after 1 attempts
2024-04-26 11:06:52,552 - url_helper.py[DEBUG]: [0/6] open 'http://169.254.169.254:80/2021-03-23/meta-data/events/maintenance/history' with {'url': 'http://169.254.169.254:80/2021-03-23/meta-data/events/maintenance/history', 'allow_redirects': True, 'method': 'GET', 'timeout': 5.0, 'headers': {'X-aws-ec2-metadata-token': 'REDACTED'}} configuration
2024-04-26 11:06:52,555 - url_helper.py[DEBUG]: Read from http://169.254.169.254:80/2021-03-23/meta-data/events/maintenance/history (200, 2b) after 1 attempts
2024-04-26 11:06:52,555 - url_helper.py[DEBUG]: [0/6] open 'http://169.254.169.254:80/2021-03-23/meta-data/events/maintenance/scheduled' with {'url': 'http://169.254.169.254:80/2021-03-23/meta-data/events/maintenance/scheduled', 'allow_redirects': True, 'method': 'GET', 'timeout': 5.0, 'headers': {'X-aws-ec2-metadata-token': 'REDACTED'}} configuration
2024-04-26 11:06:52,569 - url_helper.py[DEBUG]: Read from http://169.254.169.254:80/2021-03-23/meta-data/events/maintenance/scheduled (200, 2b) after 1 attempts
2024-04-26 11:06:52,569 - url_helper.py[DEBUG]: [0/6] open 'http://169.254.169.254:80/2021-03-23/meta-data/hibernation/' with {'url': 'http://169.254.169.254:80/2021-03-23/meta-data/hibernation/', 'allow_redirects': True, 'method': 'GET', 'timeout': 5.0, 'headers': {'X-aws-ec2-metadata-token': 'REDACTED'}} configuration
2024-04-26 11:06:52,572 - url_helper.py[DEBUG]: Read from http://169.254.169.254:80/2021-03-23/meta-data/hibernation/ (200, 10b) after 1 attempts
2024-04-26 11:06:52,572 - url_helper.py[DEBUG]: [0/6] open 'http://169.254.169.254:80/2021-03-23/meta-data/hibernation/configured' with {'url': 'http://169.254.169.254:80/2021-03-23/meta-data/hibernation/configured', 'allow_redirects': True, 'method': 'GET', 'timeout': 5.0, 'headers': {'X-aws-ec2-metadata-token': 'REDACTED'}} configuration
2024-04-26 11:06:52,575 - url_helper.py[DEBUG]: Read from http://169.254.169.254:80/2021-03-23/meta-data/hibernation/configured (200, 5b) after 1 attempts
2024-04-26 11:06:52,575 - url_helper.py[DEBUG]: [0/6] open 'http://169.254.169.254:80/2021-03-23/meta-data/iam/' with {'url': 'http://169.254.169.254:80/2021-03-23/meta-data/iam/', 'allow_redirects': True, 'method': 'GET', 'timeout': 5.0, 'headers': {'X-aws-ec2-metadata-token': 'REDACTED'}} configuration
2024-04-26 11:06:52,579 - url_helper.py[DEBUG]: Read from http://169.254.169.254:80/2021-03-23/meta-data/iam/ (200, 26b) after 1 attempts
2024-04-26 11:06:52,579 - url_helper.py[DEBUG]: [0/6] open 'http://169.254.169.254:80/2021-03-23/meta-data/iam/info' with {'url': 'http://169.254.169.254:80/2021-03-23/meta-data/iam/info', 'allow_redirects': True, 'method': 'GET', 'timeout': 5.0, 'headers': {'X-aws-ec2-metadata-token': 'REDACTED'}} configuration
2024-04-26 11:06:52,589 - url_helper.py[DEBUG]: Read from http://169.254.169.254:80/2021-03-23/meta-data/iam/info (200, 222b) after 1 attempts
2024-04-26 11:06:52,589 - url_helper.py[DEBUG]: [0/6] open 'http://169.254.169.254:80/2021-03-23/meta-data/identity-credentials/' with {'url': 'http://169.254.169.254:80/2021-03-23/meta-data/identity-credentials/', 'allow_redirects': True, 'method': 'GET', 'timeout': 5.0, 'headers': {'X-aws-ec2-metadata-token': 'REDACTED'}} configuration
2024-04-26 11:06:52,599 - url_helper.py[DEBUG]: Read from http://169.254.169.254:80/2021-03-23/meta-data/identity-credentials/ (200, 4b) after 1 attempts
2024-04-26 11:06:52,599 - url_helper.py[DEBUG]: [0/6] open 'http://169.254.169.254:80/2021-03-23/meta-data/identity-credentials/ec2/' with {'url': 'http://169.254.169.254:80/2021-03-23/meta-data/identity-credentials/ec2/', 'allow_redirects': True, 'method': 'GET', 'timeout': 5.0, 'headers': {'X-aws-ec2-metadata-token': 'REDACTED'}} configuration
2024-04-26 11:06:52,609 - url_helper.py[DEBUG]: Read from http://169.254.169.254:80/2021-03-23/meta-data/identity-credentials/ec2/ (200, 26b) after 1 attempts
2024-04-26 11:06:52,609 - url_helper.py[DEBUG]: [0/6] open 'http://169.254.169.254:80/2021-03-23/meta-data/identity-credentials/ec2/info' with {'url': 'http://169.254.169.254:80/2021-03-23/meta-data/identity-credentials/ec2/info', 'allow_redirects': True, 'method': 'GET', 'timeout': 5.0, 'headers': {'X-aws-ec2-metadata-token': 'REDACTED'}} configuration
2024-04-26 11:06:52,614 - url_helper.py[DEBUG]: Read from http://169.254.169.254:80/2021-03-23/meta-data/identity-credentials/ec2/info (200, 98b) after 1 attempts
2024-04-26 11:06:52,614 - url_helper.py[DEBUG]: [0/6] open 'http://169.254.169.254:80/2021-03-23/meta-data/metrics/' with {'url': 'http://169.254.169.254:80/2021-03-23/meta-data/metrics/', 'allow_redirects': True, 'method': 'GET', 'timeout': 5.0, 'headers': {'X-aws-ec2-metadata-token': 'REDACTED'}} configuration
2024-04-26 11:06:52,616 - url_helper.py[DEBUG]: Read from http://169.254.169.254:80/2021-03-23/meta-data/metrics/ (200, 7b) after 1 attempts
2024-04-26 11:06:52,616 - url_helper.py[DEBUG]: [0/6] open 'http://169.254.169.254:80/2021-03-23/meta-data/metrics/vhostmd' with {'url': 'http://169.254.169.254:80/2021-03-23/meta-data/metrics/vhostmd', 'allow_redirects': True, 'method': 'GET', 'timeout': 5.0, 'headers': {'X-aws-ec2-metadata-token': 'REDACTED'}} configuration
2024-04-26 11:06:52,629 - url_helper.py[DEBUG]: Read from http://169.254.169.254:80/2021-03-23/meta-data/metrics/vhostmd (200, 38b) after 1 attempts
2024-04-26 11:06:52,629 - url_helper.py[DEBUG]: [0/6] open 'http://169.254.169.254:80/2021-03-23/meta-data/network/' with {'url': 'http://169.254.169.254:80/2021-03-23/meta-data/network/', 'allow_redirects': True, 'method': 'GET', 'timeout': 5.0, 'headers': {'X-aws-ec2-metadata-token': 'REDACTED'}} configuration
2024-04-26 11:06:52,632 - url_helper.py[DEBUG]: Read from http://169.254.169.254:80/2021-03-23/meta-data/network/ (200, 11b) after 1 attempts
2024-04-26 11:06:52,632 - url_helper.py[DEBUG]: [0/6] open 'http://169.254.169.254:80/2021-03-23/meta-data/network/interfaces/' with {'url': 'http://169.254.169.254:80/2021-03-23/meta-data/network/interfaces/', 'allow_redirects': True, 'method': 'GET', 'timeout': 5.0, 'headers': {'X-aws-ec2-metadata-token': 'REDACTED'}} configuration
2024-04-26 11:06:52,635 - url_helper.py[DEBUG]: Read from http://169.254.169.254:80/2021-03-23/meta-data/network/interfaces/ (200, 5b) after 1 attempts
2024-04-26 11:06:52,635 - url_helper.py[DEBUG]: [0/6] open 'http://169.254.169.254:80/2021-03-23/meta-data/network/interfaces/macs/' with {'url': 'http://169.254.169.254:80/2021-03-23/meta-data/network/interfaces/macs/', 'allow_redirects': True, 'method': 'GET', 'timeout': 5.0, 'headers': {'X-aws-ec2-metadata-token': 'REDACTED'}} configuration
2024-04-26 11:06:52,639 - url_helper.py[DEBUG]: Read from http://169.254.169.254:80/2021-03-23/meta-data/network/interfaces/macs/ (200, 18b) after 1 attempts
2024-04-26 11:06:52,639 - url_helper.py[DEBUG]: [0/6] open 'http://169.254.169.254:80/2021-03-23/meta-data/network/interfaces/macs/0a:ff:e5:36:11:b9/' with {'url': 'http://169.254.169.254:80/2021-03-23/meta-data/network/interfaces/macs/0a:ff:e5:36:11:b9/', 'allow_redirects': True, 'method': 'GET', 'timeout': 5.0, 'headers': {'X-aws-ec2-metadata-token': 'REDACTED'}} configuration
2024-04-26 11:06:52,650 - url_helper.py[DEBUG]: Read from http://169.254.169.254:80/2021-03-23/meta-data/network/interfaces/macs/0a:ff:e5:36:11:b9/ (200, 230b) after 1 attempts
2024-04-26 11:06:52,651 - url_helper.py[DEBUG]: [0/6] open 'http://169.254.169.254:80/2021-03-23/meta-data/network/interfaces/macs/0a:ff:e5:36:11:b9/ipv4-associations/' with {'url': 'http://169.254.169.254:80/2021-03-23/meta-data/network/interfaces/macs/0a:ff:e5:36:11:b9/ipv4-associations/', 'allow_redirects': True, 'method': 'GET', 'timeout': 5.0, 'headers': {'X-aws-ec2-metadata-token': 'REDACTED'}} configuration
2024-04-26 11:06:52,660 - url_helper.py[DEBUG]: Read from http://169.254.169.254:80/2021-03-23/meta-data/network/interfaces/macs/0a:ff:e5:36:11:b9/ipv4-associations/ (200, 12b) after 1 attempts
2024-04-26 11:06:52,661 - url_helper.py[DEBUG]: [0/6] open 'http://169.254.169.254:80/2021-03-23/meta-data/network/interfaces/macs/0a:ff:e5:36:11:b9/ipv4-associations/18.212.82.61' with {'url': 'http://169.254.169.254:80/2021-03-23/meta-data/network/interfaces/macs/0a:ff:e5:36:11:b9/ipv4-associations/18.212.82.61', 'allow_redirects': True, 'method': 'GET', 'timeout': 5.0, 'headers': {'X-aws-ec2-metadata-token': 'REDACTED'}} configuration
2024-04-26 11:06:52,669 - url_helper.py[DEBUG]: Read from http://169.254.169.254:80/2021-03-23/meta-data/network/interfaces/macs/0a:ff:e5:36:11:b9/ipv4-associations/18.212.82.61 (200, 12b) after 1 attempts
2024-04-26 11:06:52,669 - url_helper.py[DEBUG]: [0/6] open 'http://169.254.169.254:80/2021-03-23/meta-data/network/interfaces/macs/0a:ff:e5:36:11:b9/device-number' with {'url': 'http://169.254.169.254:80/2021-03-23/meta-data/network/interfaces/macs/0a:ff:e5:36:11:b9/device-number', 'allow_redirects': True, 'method': 'GET', 'timeout': 5.0, 'headers': {'X-aws-ec2-metadata-token': 'REDACTED'}} configuration
2024-04-26 11:06:52,672 - url_helper.py[DEBUG]: Read from http://169.254.169.254:80/2021-03-23/meta-data/network/interfaces/macs/0a:ff:e5:36:11:b9/device-number (200, 1b) after 1 attempts
2024-04-26 11:06:52,673 - url_helper.py[DEBUG]: [0/6] open 'http://169.254.169.254:80/2021-03-23/meta-data/network/interfaces/macs/0a:ff:e5:36:11:b9/interface-id' with {'url': 'http://169.254.169.254:80/2021-03-23/meta-data/network/interfaces/macs/0a:ff:e5:36:11:b9/interface-id', 'allow_redirects': True, 'method': 'GET', 'timeout': 5.0, 'headers': {'X-aws-ec2-metadata-token': 'REDACTED'}} configuration
2024-04-26 11:06:52,675 - url_helper.py[DEBUG]: Read from http://169.254.169.254:80/2021-03-23/meta-data/network/interfaces/macs/0a:ff:e5:36:11:b9/interface-id (200, 21b) after 1 attempts
2024-04-26 11:06:52,675 - url_helper.py[DEBUG]: [0/6] open 'http://169.254.169.254:80/2021-03-23/meta-data/network/interfaces/macs/0a:ff:e5:36:11:b9/local-hostname' with {'url': 'http://169.254.169.254:80/2021-03-23/meta-data/network/interfaces/macs/0a:ff:e5:36:11:b9/local-hostname', 'allow_redirects': True, 'method': 'GET', 'timeout': 5.0, 'headers': {'X-aws-ec2-metadata-token': 'REDACTED'}} configuration
2024-04-26 11:06:52,679 - url_helper.py[DEBUG]: Read from http://169.254.169.254:80/2021-03-23/meta-data/network/interfaces/macs/0a:ff:e5:36:11:b9/local-hostname (200, 28b) after 1 attempts
2024-04-26 11:06:52,679 - url_helper.py[DEBUG]: [0/6] open 'http://169.254.169.254:80/2021-03-23/meta-data/network/interfaces/macs/0a:ff:e5:36:11:b9/local-ipv4s' with {'url': 'http://169.254.169.254:80/2021-03-23/meta-data/network/interfaces/macs/0a:ff:e5:36:11:b9/local-ipv4s', 'allow_redirects': True, 'method': 'GET', 'timeout': 5.0, 'headers': {'X-aws-ec2-metadata-token': 'REDACTED'}} configuration
2024-04-26 11:06:52,689 - url_helper.py[DEBUG]: Read from http://169.254.169.254:80/2021-03-23/meta-data/network/interfaces/macs/0a:ff:e5:36:11:b9/local-ipv4s (200, 12b) after 1 attempts
2024-04-26 11:06:52,689 - url_helper.py[DEBUG]: [0/6] open 'http://169.254.169.254:80/2021-03-23/meta-data/network/interfaces/macs/0a:ff:e5:36:11:b9/mac' with {'url': 'http://169.254.169.254:80/2021-03-23/meta-data/network/interfaces/macs/0a:ff:e5:36:11:b9/mac', 'allow_redirects': True, 'method': 'GET', 'timeout': 5.0, 'headers': {'X-aws-ec2-metadata-token': 'REDACTED'}} configuration
2024-04-26 11:06:52,692 - url_helper.py[DEBUG]: Read from http://169.254.169.254:80/2021-03-23/meta-data/network/interfaces/macs/0a:ff:e5:36:11:b9/mac (200, 17b) after 1 attempts
2024-04-26 11:06:52,692 - url_helper.py[DEBUG]: [0/6] open 'http://169.254.169.254:80/2021-03-23/meta-data/network/interfaces/macs/0a:ff:e5:36:11:b9/owner-id' with {'url': 'http://169.254.169.254:80/2021-03-23/meta-data/network/interfaces/macs/0a:ff:e5:36:11:b9/owner-id', 'allow_redirects': True, 'method': 'GET', 'timeout': 5.0, 'headers': {'X-aws-ec2-metadata-token': 'REDACTED'}} configuration
2024-04-26 11:06:52,699 - url_helper.py[DEBUG]: Read from http://169.254.169.254:80/2021-03-23/meta-data/network/interfaces/macs/0a:ff:e5:36:11:b9/owner-id (200, 12b) after 1 attempts
2024-04-26 11:06:52,699 - url_helper.py[DEBUG]: [0/6] open 'http://169.254.169.254:80/2021-03-23/meta-data/network/interfaces/macs/0a:ff:e5:36:11:b9/public-hostname' with {'url': 'http://169.254.169.254:80/2021-03-23/meta-data/network/interfaces/macs/0a:ff:e5:36:11:b9/public-hostname', 'allow_redirects': True, 'method': 'GET', 'timeout': 5.0, 'headers': {'X-aws-ec2-metadata-token': 'REDACTED'}} configuration
2024-04-26 11:06:52,706 - url_helper.py[DEBUG]: Read from http://169.254.169.254:80/2021-03-23/meta-data/network/interfaces/macs/0a:ff:e5:36:11:b9/public-hostname (200, 40b) after 1 attempts
2024-04-26 11:06:52,706 - url_helper.py[DEBUG]: [0/6] open 'http://169.254.169.254:80/2021-03-23/meta-data/network/interfaces/macs/0a:ff:e5:36:11:b9/public-ipv4s' with {'url': 'http://169.254.169.254:80/2021-03-23/meta-data/network/interfaces/macs/0a:ff:e5:36:11:b9/public-ipv4s', 'allow_redirects': True, 'method': 'GET', 'timeout': 5.0, 'headers': {'X-aws-ec2-metadata-token': 'REDACTED'}} configuration
2024-04-26 11:06:52,715 - url_helper.py[DEBUG]: Read from http://169.254.169.254:80/2021-03-23/meta-data/network/interfaces/macs/0a:ff:e5:36:11:b9/public-ipv4s (200, 12b) after 1 attempts
2024-04-26 11:06:52,715 - url_helper.py[DEBUG]: [0/6] open 'http://169.254.169.254:80/2021-03-23/meta-data/network/interfaces/macs/0a:ff:e5:36:11:b9/security-group-ids' with {'url': 'http://169.254.169.254:80/2021-03-23/meta-data/network/interfaces/macs/0a:ff:e5:36:11:b9/security-group-ids', 'allow_redirects': True, 'method': 'GET', 'timeout': 5.0, 'headers': {'X-aws-ec2-metadata-token': 'REDACTED'}} configuration
2024-04-26 11:06:52,720 - url_helper.py[DEBUG]: Read from http://169.254.169.254:80/2021-03-23/meta-data/network/interfaces/macs/0a:ff:e5:36:11:b9/security-group-ids (200, 20b) after 1 attempts
2024-04-26 11:06:52,721 - url_helper.py[DEBUG]: [0/6] open 'http://169.254.169.254:80/2021-03-23/meta-data/network/interfaces/macs/0a:ff:e5:36:11:b9/security-groups' with {'url': 'http://169.254.169.254:80/2021-03-23/meta-data/network/interfaces/macs/0a:ff:e5:36:11:b9/security-groups', 'allow_redirects': True, 'method': 'GET', 'timeout': 5.0, 'headers': {'X-aws-ec2-metadata-token': 'REDACTED'}} configuration
2024-04-26 11:06:52,723 - url_helper.py[DEBUG]: Read from http://169.254.169.254:80/2021-03-23/meta-data/network/interfaces/macs/0a:ff:e5:36:11:b9/security-groups (200, 7b) after 1 attempts
2024-04-26 11:06:52,724 - url_helper.py[DEBUG]: [0/6] open 'http://169.254.169.254:80/2021-03-23/meta-data/network/interfaces/macs/0a:ff:e5:36:11:b9/subnet-id' with {'url': 'http://169.254.169.254:80/2021-03-23/meta-data/network/interfaces/macs/0a:ff:e5:36:11:b9/subnet-id', 'allow_redirects': True, 'method': 'GET', 'timeout': 5.0, 'headers': {'X-aws-ec2-metadata-token': 'REDACTED'}} configuration
2024-04-26 11:06:52,730 - url_helper.py[DEBUG]: Read from http://169.254.169.254:80/2021-03-23/meta-data/network/interfaces/macs/0a:ff:e5:36:11:b9/subnet-id (200, 24b) after 1 attempts
2024-04-26 11:06:52,730 - url_helper.py[DEBUG]: [0/6] open 'http://169.254.169.254:80/2021-03-23/meta-data/network/interfaces/macs/0a:ff:e5:36:11:b9/subnet-ipv4-cidr-block' with {'url': 'http://169.254.169.254:80/2021-03-23/meta-data/network/interfaces/macs/0a:ff:e5:36:11:b9/subnet-ipv4-cidr-block', 'allow_redirects': True, 'method': 'GET', 'timeout': 5.0, 'headers': {'X-aws-ec2-metadata-token': 'REDACTED'}} configuration
2024-04-26 11:06:52,733 - url_helper.py[DEBUG]: Read from http://169.254.169.254:80/2021-03-23/meta-data/network/interfaces/macs/0a:ff:e5:36:11:b9/subnet-ipv4-cidr-block (200, 14b) after 1 attempts
2024-04-26 11:06:52,735 - url_helper.py[DEBUG]: [0/6] open 'http://169.254.169.254:80/2021-03-23/meta-data/network/interfaces/macs/0a:ff:e5:36:11:b9/vpc-id' with {'url': 'http://169.254.169.254:80/2021-03-23/meta-data/network/interfaces/macs/0a:ff:e5:36:11:b9/vpc-id', 'allow_redirects': True, 'method': 'GET', 'timeout': 5.0, 'headers': {'X-aws-ec2-metadata-token': 'REDACTED'}}configuration
2024-04-26 11:06:52,737 - url_helper.py[DEBUG]: Read from http://169.254.169.254:80/2021-03-23/meta-data/network/interfaces/macs/0a:ff:e5:36:11:b9/vpc-id (200, 21b) after 1 attempts
2024-04-26 11:06:52,737 - url_helper.py[DEBUG]: [0/6] open 'http://169.254.169.254:80/2021-03-23/meta-data/network/interfaces/macs/0a:ff:e5:36:11:b9/vpc-ipv4-cidr-block' with {'url': 'http://169.254.169.254:80/2021-03-23/meta-data/network/interfaces/macs/0a:ff:e5:36:11:b9/vpc-ipv4-cidr-block', 'allow_redirects': True, 'method': 'GET', 'timeout': 5.0, 'headers': {'X-aws-ec2-metadata-token': 'REDACTED'}} configuration
2024-04-26 11:06:52,751 - url_helper.py[DEBUG]: Read from http://169.254.169.254:80/2021-03-23/meta-data/network/interfaces/macs/0a:ff:e5:36:11:b9/vpc-ipv4-cidr-block (200, 13b) after 1 attempts
2024-04-26 11:06:52,751 - url_helper.py[DEBUG]: [0/6] open 'http://169.254.169.254:80/2021-03-23/meta-data/network/interfaces/macs/0a:ff:e5:36:11:b9/vpc-ipv4-cidr-blocks' with {'url': 'http://169.254.169.254:80/2021-03-23/meta-data/network/interfaces/macs/0a:ff:e5:36:11:b9/vpc-ipv4-cidr-blocks', 'allow_redirects': True, 'method': 'GET', 'timeout': 5.0, 'headers': {'X-aws-ec2-metadata-token': 'REDACTED'}} configuration
2024-04-26 11:06:52,755 - url_helper.py[DEBUG]: Read from http://169.254.169.254:80/2021-03-23/meta-data/network/interfaces/macs/0a:ff:e5:36:11:b9/vpc-ipv4-cidr-blocks (200, 13b) after 1 attempts
2024-04-26 11:06:52,755 - url_helper.py[DEBUG]: [0/6] open 'http://169.254.169.254:80/2021-03-23/meta-data/placement/' with {'url': 'http://169.254.169.254:80/2021-03-23/meta-data/placement/', 'allow_redirects': True, 'method': 'GET', 'timeout': 5.0, 'headers': {'X-aws-ec2-metadata-token': 'REDACTED'}} configuration
2024-04-26 11:06:52,769 - url_helper.py[DEBUG]: Read from http://169.254.169.254:80/2021-03-23/meta-data/placement/ (200, 45b) after 1 attempts
2024-04-26 11:06:52,769 - url_helper.py[DEBUG]: [0/6] open 'http://169.254.169.254:80/2021-03-23/meta-data/placement/availability-zone' with {'url': 'http://169.254.169.254:80/2021-03-23/meta-data/placement/availability-zone', 'allow_redirects': True, 'method': 'GET', 'timeout': 5.0, 'headers': {'X-aws-ec2-metadata-token': 'REDACTED'}} configuration
2024-04-26 11:06:52,772 - url_helper.py[DEBUG]: Read from http://169.254.169.254:80/2021-03-23/meta-data/placement/availability-zone (200, 10b) after 1 attempts
2024-04-26 11:06:52,772 - url_helper.py[DEBUG]: [0/6] open 'http://169.254.169.254:80/2021-03-23/meta-data/placement/availability-zone-id' with {'url': 'http://169.254.169.254:80/2021-03-23/meta-data/placement/availability-zone-id', 'allow_redirects': True, 'method': 'GET', 'timeout': 5.0, 'headers': {'X-aws-ec2-metadata-token': 'REDACTED'}} configuration
2024-04-26 11:06:52,775 - url_helper.py[DEBUG]: Read from http://169.254.169.254:80/2021-03-23/meta-data/placement/availability-zone-id (200, 8b) after 1 attempts
2024-04-26 11:06:52,775 - url_helper.py[DEBUG]: [0/6] open 'http://169.254.169.254:80/2021-03-23/meta-data/placement/region' with {'url': 'http://169.254.169.254:80/2021-03-23/meta-data/placement/region', 'allow_redirects': True, 'method': 'GET', 'timeout': 5.0, 'headers': {'X-aws-ec2-metadata-token': 'REDACTED'}} configuration
2024-04-26 11:06:52,779 - url_helper.py[DEBUG]: Read from http://169.254.169.254:80/2021-03-23/meta-data/placement/region (200, 9b) after 1 attempts
2024-04-26 11:06:52,779 - url_helper.py[DEBUG]: [0/6] open 'http://169.254.169.254:80/2021-03-23/meta-data/public-keys/' with {'url': 'http://169.254.169.254:80/2021-03-23/meta-data/public-keys/', 'allow_redirects': True, 'method': 'GET', 'timeout': 5.0, 'headers': {'X-aws-ec2-metadata-token': 'REDACTED'}} configuration
2024-04-26 11:06:52,781 - url_helper.py[DEBUG]: Read from http://169.254.169.254:80/2021-03-23/meta-data/public-keys/ (200, 19b) after 1 attempts
2024-04-26 11:06:52,782 - url_helper.py[DEBUG]: [0/6] open 'http://169.254.169.254:80/2021-03-23/meta-data/public-keys/0/openssh-key' with {'url': 'http://169.254.169.254:80/2021-03-23/meta-data/public-keys/0/openssh-key', 'allow_redirects': True, 'method': 'GET', 'timeout': 5.0, 'headers': {'X-aws-ec2-metadata-token': 'REDACTED'}} configuration
2024-04-26 11:06:52,784 - url_helper.py[DEBUG]: Read from http://169.254.169.254:80/2021-03-23/meta-data/public-keys/0/openssh-key (200, 399b) after 1 attempts
2024-04-26 11:06:52,785 - url_helper.py[DEBUG]: [0/6] open 'http://169.254.169.254:80/2021-03-23/meta-data/services/' with {'url': 'http://169.254.169.254:80/2021-03-23/meta-data/services/', 'allow_redirects': True, 'method': 'GET', 'timeout': 5.0, 'headers': {'X-aws-ec2-metadata-token': 'REDACTED'}} configuration
2024-04-26 11:06:52,789 - url_helper.py[DEBUG]: Read from http://169.254.169.254:80/2021-03-23/meta-data/services/ (200, 16b) after 1 attempts
2024-04-26 11:06:52,789 - url_helper.py[DEBUG]: [0/6] open 'http://169.254.169.254:80/2021-03-23/meta-data/services/domain' with {'url': 'http://169.254.169.254:80/2021-03-23/meta-data/services/domain', 'allow_redirects': True, 'method': 'GET', 'timeout': 5.0, 'headers': {'X-aws-ec2-metadata-token': 'REDACTED'}} configuration
2024-04-26 11:06:52,791 - url_helper.py[DEBUG]: Read from http://169.254.169.254:80/2021-03-23/meta-data/services/domain (200, 13b) after 1 attempts
2024-04-26 11:06:52,791 - url_helper.py[DEBUG]: [0/6] open 'http://169.254.169.254:80/2021-03-23/meta-data/services/partition' with {'url': 'http://169.254.169.254:80/2021-03-23/meta-data/services/partition', 'allow_redirects': True, 'method': 'GET', 'timeout': 5.0, 'headers': {'X-aws-ec2-metadata-token': 'REDACTED'}} configuration
2024-04-26 11:06:52,794 - url_helper.py[DEBUG]: Read from http://169.254.169.254:80/2021-03-23/meta-data/services/partition (200, 3b) after 1 attempts
2024-04-26 11:06:52,794 - url_helper.py[DEBUG]: [0/6] open 'http://169.254.169.254:80/2021-03-23/meta-data/ami-id' with {'url': 'http://169.254.169.254:80/2021-03-23/meta-data/ami-id', 'allow_redirects': True, 'method': 'GET', 'timeout': 5.0, 'headers': {'X-aws-ec2-metadata-token': 'REDACTED'}} configuration
2024-04-26 11:06:52,799 - url_helper.py[DEBUG]: Read from http://169.254.169.254:80/2021-03-23/meta-data/ami-id (200, 21b) after 1 attempts
2024-04-26 11:06:52,799 - url_helper.py[DEBUG]: [0/6] open 'http://169.254.169.254:80/2021-03-23/meta-data/ami-launch-index' with {'url': 'http://169.254.169.254:80/2021-03-23/meta-data/ami-launch-index', 'allow_redirects': True, 'method': 'GET', 'timeout': 5.0, 'headers': {'X-aws-ec2-metadata-token': 'REDACTED'}} configuration
2024-04-26 11:06:52,802 - url_helper.py[DEBUG]: Read from http://169.254.169.254:80/2021-03-23/meta-data/ami-launch-index (200, 1b) after 1 attempts
2024-04-26 11:06:52,802 - url_helper.py[DEBUG]: [0/6] open 'http://169.254.169.254:80/2021-03-23/meta-data/ami-manifest-path' with {'url': 'http://169.254.169.254:80/2021-03-23/meta-data/ami-manifest-path', 'allow_redirects': True, 'method': 'GET', 'timeout': 5.0, 'headers': {'X-aws-ec2-metadata-token': 'REDACTED'}} configuration
2024-04-26 11:06:52,804 - url_helper.py[DEBUG]: Read from http://169.254.169.254:80/2021-03-23/meta-data/ami-manifest-path (200, 9b) after 1 attempts
2024-04-26 11:06:52,804 - url_helper.py[DEBUG]: [0/6] open 'http://169.254.169.254:80/2021-03-23/meta-data/hostname' with {'url': 'http://169.254.169.254:80/2021-03-23/meta-data/hostname', 'allow_redirects': True, 'method': 'GET', 'timeout': 5.0, 'headers': {'X-aws-ec2-metadata-token': 'REDACTED'}} configuration
2024-04-26 11:06:52,819 - url_helper.py[DEBUG]: Read from http://169.254.169.254:80/2021-03-23/meta-data/hostname (200, 28b) after 1 attempts
2024-04-26 11:06:52,820 - url_helper.py[DEBUG]: [0/6] open 'http://169.254.169.254:80/2021-03-23/meta-data/instance-action' with {'url': 'http://169.254.169.254:80/2021-03-23/meta-data/instance-action', 'allow_redirects': True, 'method': 'GET', 'timeout': 5.0, 'headers': {'X-aws-ec2-metadata-token': 'REDACTED'}} configuration
2024-04-26 11:06:52,825 - url_helper.py[DEBUG]: Read from http://169.254.169.254:80/2021-03-23/meta-data/instance-action (200, 4b) after 1 attempts
2024-04-26 11:06:52,825 - url_helper.py[DEBUG]: [0/6] open 'http://169.254.169.254:80/2021-03-23/meta-data/instance-id' with {'url': 'http://169.254.169.254:80/2021-03-23/meta-data/instance-id', 'allow_redirects': True, 'method': 'GET', 'timeout': 5.0, 'headers': {'X-aws-ec2-metadata-token': 'REDACTED'}} configuration
2024-04-26 11:06:52,839 - url_helper.py[DEBUG]: Read from http://169.254.169.254:80/2021-03-23/meta-data/instance-id (200, 19b) after 1 attempts
2024-04-26 11:06:52,840 - url_helper.py[DEBUG]: [0/6] open 'http://169.254.169.254:80/2021-03-23/meta-data/instance-life-cycle' with {'url': 'http://169.254.169.254:80/2021-03-23/meta-data/instance-life-cycle', 'allow_redirects': True, 'method': 'GET', 'timeout': 5.0, 'headers': {'X-aws-ec2-metadata-token': 'REDACTED'}} configuration
2024-04-26 11:06:52,843 - url_helper.py[DEBUG]: Read from http://169.254.169.254:80/2021-03-23/meta-data/instance-life-cycle (200, 9b) after 1 attempts
2024-04-26 11:06:52,843 - url_helper.py[DEBUG]: [0/6] open 'http://169.254.169.254:80/2021-03-23/meta-data/instance-type' with {'url': 'http://169.254.169.254:80/2021-03-23/meta-data/instance-type', 'allow_redirects': True, 'method': 'GET', 'timeout': 5.0, 'headers': {'X-aws-ec2-metadata-token': 'REDACTED'}} configuration
2024-04-26 11:06:52,849 - url_helper.py[DEBUG]: Read from http://169.254.169.254:80/2021-03-23/meta-data/instance-type (200, 8b) after 1 attempts
2024-04-26 11:06:52,849 - url_helper.py[DEBUG]: [0/6] open 'http://169.254.169.254:80/2021-03-23/meta-data/local-hostname' with {'url': 'http://169.254.169.254:80/2021-03-23/meta-data/local-hostname', 'allow_redirects': True, 'method': 'GET', 'timeout': 5.0, 'headers': {'X-aws-ec2-metadata-token': 'REDACTED'}} configuration
2024-04-26 11:06:52,852 - url_helper.py[DEBUG]: Read from http://169.254.169.254:80/2021-03-23/meta-data/local-hostname (200, 28b) after 1 attempts
2024-04-26 11:06:52,852 - url_helper.py[DEBUG]: [0/6] open 'http://169.254.169.254:80/2021-03-23/meta-data/local-ipv4' with {'url': 'http://169.254.169.254:80/2021-03-23/meta-data/local-ipv4', 'allow_redirects': True, 'method': 'GET', 'timeout': 5.0, 'headers': {'X-aws-ec2-metadata-token': 'REDACTED'}} configuration
2024-04-26 11:06:52,854 - url_helper.py[DEBUG]: Read from http://169.254.169.254:80/2021-03-23/meta-data/local-ipv4 (200, 12b) after 1 attempts
2024-04-26 11:06:52,854 - url_helper.py[DEBUG]: [0/6] open 'http://169.254.169.254:80/2021-03-23/meta-data/mac' with {'url': 'http://169.254.169.254:80/2021-03-23/meta-data/mac', 'allow_redirects': True, 'method': 'GET', 'timeout': 5.0, 'headers': {'X-aws-ec2-metadata-token': 'REDACTED'}} configuration
2024-04-26 11:06:52,859 - url_helper.py[DEBUG]: Read from http://169.254.169.254:80/2021-03-23/meta-data/mac (200, 17b) after 1 attempts
2024-04-26 11:06:52,859 - url_helper.py[DEBUG]: [0/6] open 'http://169.254.169.254:80/2021-03-23/meta-data/profile' with {'url': 'http://169.254.169.254:80/2021-03-23/meta-data/profile', 'allow_redirects': True, 'method': 'GET', 'timeout': 5.0, 'headers': {'X-aws-ec2-metadata-token': 'REDACTED'}} configuration
2024-04-26 11:06:52,862 - url_helper.py[DEBUG]: Read from http://169.254.169.254:80/2021-03-23/meta-data/profile (200, 11b) after 1 attempts
2024-04-26 11:06:52,862 - url_helper.py[DEBUG]: [0/6] open 'http://169.254.169.254:80/2021-03-23/meta-data/public-hostname' with {'url': 'http://169.254.169.254:80/2021-03-23/meta-data/public-hostname', 'allow_redirects': True, 'method': 'GET', 'timeout': 5.0, 'headers': {'X-aws-ec2-metadata-token': 'REDACTED'}} configuration
2024-04-26 11:06:52,865 - url_helper.py[DEBUG]: Read from http://169.254.169.254:80/2021-03-23/meta-data/public-hostname (200, 40b) after 1 attempts
2024-04-26 11:06:52,865 - url_helper.py[DEBUG]: [0/6] open 'http://169.254.169.254:80/2021-03-23/meta-data/public-ipv4' with {'url': 'http://169.254.169.254:80/2021-03-23/meta-data/public-ipv4', 'allow_redirects': True, 'method': 'GET', 'timeout': 5.0, 'headers': {'X-aws-ec2-metadata-token': 'REDACTED'}} configuration
2024-04-26 11:06:52,867 - url_helper.py[DEBUG]: Read from http://169.254.169.254:80/2021-03-23/meta-data/public-ipv4 (200, 12b) after 1 attempts
2024-04-26 11:06:52,867 - url_helper.py[DEBUG]: [0/6] open 'http://169.254.169.254:80/2021-03-23/meta-data/reservation-id' with {'url': 'http://169.254.169.254:80/2021-03-23/meta-data/reservation-id', 'allow_redirects': True, 'method': 'GET', 'timeout': 5.0, 'headers': {'X-aws-ec2-metadata-token': 'REDACTED'}} configuration
2024-04-26 11:06:52,880 - url_helper.py[DEBUG]: Read from http://169.254.169.254:80/2021-03-23/meta-data/reservation-id (200, 19b) after 1 attempts
2024-04-26 11:06:52,880 - url_helper.py[DEBUG]: [0/6] open 'http://169.254.169.254:80/2021-03-23/meta-data/security-groups' with {'url': 'http://169.254.169.254:80/2021-03-23/meta-data/security-groups', 'allow_redirects': True, 'method': 'GET', 'timeout': 5.0, 'headers': {'X-aws-ec2-metadata-token': 'REDACTED'}} configuration
2024-04-26 11:06:52,883 - url_helper.py[DEBUG]: Read from http://169.254.169.254:80/2021-03-23/meta-data/security-groups (200, 7b) after 1 attempts
2024-04-26 11:06:52,883 - url_helper.py[DEBUG]: [0/6] open 'http://169.254.169.254:80/2021-03-23/dynamic/instance-identity' with {'url': 'http://169.254.169.254:80/2021-03-23/dynamic/instance-identity', 'allow_redirects': True, 'method': 'GET', 'timeout': 5.0, 'headers': {'X-aws-ec2-metadata-token': 'REDACTED'}} configuration
2024-04-26 11:06:52,885 - url_helper.py[DEBUG]: Read from http://169.254.169.254:80/2021-03-23/dynamic/instance-identity (200, 32b) after 1 attempts
2024-04-26 11:06:52,885 - url_helper.py[DEBUG]: [0/6] open 'http://169.254.169.254:80/2021-03-23/dynamic/instance-identity/document' with {'url': 'http://169.254.169.254:80/2021-03-23/dynamic/instance-identity/document', 'allow_redirects': True, 'method': 'GET', 'timeout': 5.0, 'headers': {'X-aws-ec2-metadata-token': 'REDACTED'}} configuration
2024-04-26 11:06:52,890 - url_helper.py[DEBUG]: Read from http://169.254.169.254:80/2021-03-23/dynamic/instance-identity/document (200, 476b) after 1 attempts
2024-04-26 11:06:52,890 - url_helper.py[DEBUG]: [0/6] open 'http://169.254.169.254:80/2021-03-23/dynamic/instance-identity/pkcs7' with {'url': 'http://169.254.169.254:80/2021-03-23/dynamic/instance-identity/pkcs7', 'allow_redirects': True, 'method': 'GET', 'timeout': 5.0, 'headers': {'X-aws-ec2-metadata-token': 'REDACTED'}} configuration
2024-04-26 11:06:52,892 - url_helper.py[DEBUG]: Read from http://169.254.169.254:80/2021-03-23/dynamic/instance-identity/pkcs7 (200, 1171b) after 1 attempts
2024-04-26 11:06:52,892 - url_helper.py[DEBUG]: [0/6] open 'http://169.254.169.254:80/2021-03-23/dynamic/instance-identity/rsa2048' with {'url': 'http://169.254.169.254:80/2021-03-23/dynamic/instance-identity/rsa2048', 'allow_redirects': True, 'method': 'GET', 'timeout': 5.0, 'headers': {'X-aws-ec2-metadata-token': 'REDACTED'}} configuration
2024-04-26 11:06:52,894 - url_helper.py[DEBUG]: Read from http://169.254.169.254:80/2021-03-23/dynamic/instance-identity/rsa2048 (200, 1491b) after 1 attempts
2024-04-26 11:06:52,894 - url_helper.py[DEBUG]: [0/6] open 'http://169.254.169.254:80/2021-03-23/dynamic/instance-identity/signature' with {'url': 'http://169.254.169.254:80/2021-03-23/dynamic/instance-identity/signature', 'allow_redirects': True, 'method': 'GET', 'timeout': 5.0, 'headers': {'X-aws-ec2-metadata-token': 'REDACTED'}} configuration
2024-04-26 11:06:52,901 - url_helper.py[DEBUG]: Read from http://169.254.169.254:80/2021-03-23/dynamic/instance-identity/signature (200, 174b) after 1 attempts
2024-04-26 11:06:52,901 - util.py[DEBUG]: Crawl of metadata service took 0.418 seconds
2024-04-26 11:06:52,906 - util.py[DEBUG]: Writing to /run/cloud-init/cloud-id-aws - wb: [644] 4 bytes
2024-04-26 11:06:52,907 - util.py[DEBUG]: Restoring selinux mode for /run/cloud-init/cloud-id-aws (recursive=False)
2024-04-26 11:06:52,908 - util.py[DEBUG]: Restoring selinux mode for /run/cloud-init/cloud-id-aws (recursive=False)
2024-04-26 11:06:52,908 - util.py[DEBUG]: Creating symbolic link from '/run/cloud-init/cloud-id' => '/run/cloud-init/cloud-id-aws'
2024-04-26 11:06:52,909 - atomic_helper.py[DEBUG]: Atomically writing to file /run/cloud-init/instance-data-sensitive.json (via temporary file /run/cloud-init/tmprh4hb8vh) - w: [600] 12752 bytes/chars
2024-04-26 11:06:52,911 - atomic_helper.py[DEBUG]: Atomically writing to file /run/cloud-init/instance-data.json (via temporary file /run/cloud-init/tmprk1oq336) - w: [644] 8610 bytes/chars
2024-04-26 11:06:52,911 - handlers.py[DEBUG]: finish: init-network/search-Ec2: SUCCESS: found network data from DataSourceEc2
2024-04-26 11:06:52,912 - stages.py[INFO]: Loaded datasource DataSourceEc2 - DataSourceEc2
2024-04-26 11:06:52,912 - util.py[DEBUG]: Reading from /etc/cloud/cloud.cfg (quiet=False)
2024-04-26 11:06:52,912 - util.py[DEBUG]: Read 2553 bytes from /etc/cloud/cloud.cfg
2024-04-26 11:06:52,912 - util.py[DEBUG]: Attempting to load yaml from string of length 2553 with allowed root types (<class 'dict'>,)
2024-04-26 11:06:52,937 - util.py[DEBUG]: Reading from /etc/cloud/cloud.cfg.d/40_selinux-reboot.cfg (quiet=False)
2024-04-26 11:06:52,937 - util.py[DEBUG]: Read 174 bytes from /etc/cloud/cloud.cfg.d/40_selinux-reboot.cfg
2024-04-26 11:06:52,937 - util.py[DEBUG]: Attempting to load yaml from string of length 174 with allowed root types (<class 'dict'>,)
2024-04-26 11:06:52,949 - util.py[DEBUG]: Reading from /etc/cloud/cloud.cfg.d/10_aws_dnfvars.cfg (quiet=False)
2024-04-26 11:06:52,949 - util.py[DEBUG]: Read 591 bytes from /etc/cloud/cloud.cfg.d/10_aws_dnfvars.cfg
2024-04-26 11:06:52,949 - util.py[DEBUG]: Attempting to load yaml from string of length 591 with allowed root types (<class 'dict'>,)
2024-04-26 11:06:52,952 - util.py[DEBUG]: Reading from /etc/cloud/cloud.cfg.d/05_logging.cfg (quiet=False)
2024-04-26 11:06:52,952 - util.py[DEBUG]: Read 2070 bytes from /etc/cloud/cloud.cfg.d/05_logging.cfg
2024-04-26 11:06:52,952 - util.py[DEBUG]: Attempting to load yaml from string of length 2070 with allowed root types (<class 'dict'>,)
2024-04-26 11:06:52,959 - util.py[DEBUG]: Reading from /etc/cloud/cloud.cfg.d/01_amazon-ec2.cfg (quiet=False)
2024-04-26 11:06:52,959 - util.py[DEBUG]: Read 237 bytes from /etc/cloud/cloud.cfg.d/01_amazon-ec2.cfg
2024-04-26 11:06:52,959 - util.py[DEBUG]: Attempting to load yaml from string of length 237 with allowed root types (<class 'dict'>,)
2024-04-26 11:06:52,963 - util.py[DEBUG]: Reading from /run/cloud-init/cloud.cfg (quiet=False)
2024-04-26 11:06:52,963 - util.py[DEBUG]: Attempting to load yaml from string of length 0 with allowed root types (<class 'dict'>,)
2024-04-26 11:06:52,963 - util.py[DEBUG]: loaded blob returned None, returning default.
2024-04-26 11:06:52,964 - util.py[DEBUG]: Attempting to remove /var/lib/cloud/instance
2024-04-26 11:06:52,964 - util.py[DEBUG]: Creating symbolic link from '/var/lib/cloud/instance' => '/var/lib/cloud/instances/i-0a5ccc4a0f86755be'
2024-04-26 11:06:52,965 - util.py[DEBUG]: Restoring selinux mode for /var/lib/cloud/instances/i-0a5ccc4a0f86755be (recursive=True)
2024-04-26 11:06:52,970 - util.py[DEBUG]: Restoring selinux mode for /var/lib/cloud/instances/i-0a5ccc4a0f86755be/handlers (recursive=False)
2024-04-26 11:06:52,971 - util.py[DEBUG]: Restoring selinux mode for /var/lib/cloud/instances/i-0a5ccc4a0f86755be (recursive=True)
2024-04-26 11:06:52,988 - util.py[DEBUG]: Restoring selinux mode for /var/lib/cloud/instances/i-0a5ccc4a0f86755be/scripts (recursive=False)
2024-04-26 11:06:52,989 - util.py[DEBUG]: Restoring selinux mode for /var/lib/cloud/instances/i-0a5ccc4a0f86755be (recursive=True)
2024-04-26 11:06:52,998 - util.py[DEBUG]: Restoring selinux mode for /var/lib/cloud/instances/i-0a5ccc4a0f86755be/sem (recursive=False)
2024-04-26 11:06:52,999 - util.py[DEBUG]: Reading from /var/lib/cloud/instances/i-0a5ccc4a0f86755be/datasource (quiet=False)
2024-04-26 11:06:52,999 - util.py[DEBUG]: Writing to /var/lib/cloud/instances/i-0a5ccc4a0f86755be/datasource - wb: [644] 29 bytes
2024-04-26 11:06:53,000 - util.py[DEBUG]: Restoring selinux mode for /var/lib/cloud/instances/i-0a5ccc4a0f86755be/datasource (recursive=False)
2024-04-26 11:06:53,001 - util.py[DEBUG]: Restoring selinux mode for /var/lib/cloud/instances/i-0a5ccc4a0f86755be/datasource (recursive=False)
2024-04-26 11:06:53,002 - util.py[DEBUG]: Writing to /var/lib/cloud/data/previous-datasource - wb: [644] 29 bytes
2024-04-26 11:06:53,002 - util.py[DEBUG]: Restoring selinux mode for /var/lib/cloud/data/previous-datasource (recursive=False)
2024-04-26 11:06:53,004 - util.py[DEBUG]: Restoring selinux mode for /var/lib/cloud/data/previous-datasource (recursive=False)
2024-04-26 11:06:53,004 - util.py[DEBUG]: Reading from /var/lib/cloud/data/instance-id (quiet=False)
2024-04-26 11:06:53,004 - stages.py[DEBUG]: previous iid found to be NO_PREVIOUS_INSTANCE_ID
2024-04-26 11:06:53,004 - util.py[DEBUG]: Writing to /var/lib/cloud/data/instance-id - wb: [644] 20 bytes
2024-04-26 11:06:53,005 - util.py[DEBUG]: Restoring selinux mode for /var/lib/cloud/data/instance-id (recursive=False)
2024-04-26 11:06:53,006 - util.py[DEBUG]: Restoring selinux mode for /var/lib/cloud/data/instance-id (recursive=False)
2024-04-26 11:06:53,006 - util.py[DEBUG]: Writing to /run/cloud-init/.instance-id - wb: [644] 20 bytes
2024-04-26 11:06:53,007 - util.py[DEBUG]: Restoring selinux mode for /run/cloud-init/.instance-id (recursive=False)
2024-04-26 11:06:53,007 - util.py[DEBUG]: Restoring selinux mode for /run/cloud-init/.instance-id (recursive=False)
2024-04-26 11:06:53,019 - util.py[DEBUG]: Writing to /var/lib/cloud/data/previous-instance-id - wb: [644] 24 bytes
2024-04-26 11:06:53,020 - util.py[DEBUG]: Restoring selinux mode for /var/lib/cloud/data/previous-instance-id (recursive=False)
2024-04-26 11:06:53,022 - util.py[DEBUG]: Restoring selinux mode for /var/lib/cloud/data/previous-instance-id (recursive=False)
2024-04-26 11:06:53,023 - util.py[DEBUG]: Writing to /var/lib/cloud/instance/obj.pkl - wb: [400] 10561 bytes
2024-04-26 11:06:53,024 - util.py[DEBUG]: Restoring selinux mode for /var/lib/cloud/instances/i-0a5ccc4a0f86755be/obj.pkl (recursive=False)
2024-04-26 11:06:53,025 - util.py[DEBUG]: Restoring selinux mode for /var/lib/cloud/instances/i-0a5ccc4a0f86755be/obj.pkl (recursive=False)
2024-04-26 11:06:53,025 - main.py[DEBUG]: [net] init will now be targeting instance id: i-0a5ccc4a0f86755be. new=True
2024-04-26 11:06:53,026 - util.py[DEBUG]: Reading from /etc/cloud/cloud.cfg (quiet=False)
2024-04-26 11:06:53,026 - util.py[DEBUG]: Read 2553 bytes from /etc/cloud/cloud.cfg
2024-04-26 11:06:53,026 - util.py[DEBUG]: Attempting to load yaml from string of length 2553 with allowed root types (<class 'dict'>,)
2024-04-26 11:06:53,052 - util.py[DEBUG]: Reading from /etc/cloud/cloud.cfg.d/40_selinux-reboot.cfg (quiet=False)
2024-04-26 11:06:53,053 - util.py[DEBUG]: Read 174 bytes from /etc/cloud/cloud.cfg.d/40_selinux-reboot.cfg
2024-04-26 11:06:53,053 - util.py[DEBUG]: Attempting to load yaml from string of length 174 with allowed root types (<class 'dict'>,)
2024-04-26 11:06:53,054 - util.py[DEBUG]: Reading from /etc/cloud/cloud.cfg.d/10_aws_dnfvars.cfg (quiet=False)
2024-04-26 11:06:53,054 - util.py[DEBUG]: Read 591 bytes from /etc/cloud/cloud.cfg.d/10_aws_dnfvars.cfg
2024-04-26 11:06:53,054 - util.py[DEBUG]: Attempting to load yaml from string of length 591 with allowed root types (<class 'dict'>,)
2024-04-26 11:06:53,057 - util.py[DEBUG]: Reading from /etc/cloud/cloud.cfg.d/05_logging.cfg (quiet=False)
2024-04-26 11:06:53,057 - util.py[DEBUG]: Read 2070 bytes from /etc/cloud/cloud.cfg.d/05_logging.cfg
2024-04-26 11:06:53,058 - util.py[DEBUG]: Attempting to load yaml from string of length 2070 with allowed root types (<class 'dict'>,)
2024-04-26 11:06:53,074 - util.py[DEBUG]: Reading from /etc/cloud/cloud.cfg.d/01_amazon-ec2.cfg (quiet=False)
2024-04-26 11:06:53,074 - util.py[DEBUG]: Read 237 bytes from /etc/cloud/cloud.cfg.d/01_amazon-ec2.cfg
2024-04-26 11:06:53,074 - util.py[DEBUG]: Attempting to load yaml from string of length 237 with allowed root types (<class 'dict'>,)
2024-04-26 11:06:53,077 - util.py[DEBUG]: Reading from /run/cloud-init/cloud.cfg (quiet=False)
2024-04-26 11:06:53,077 - util.py[DEBUG]: Attempting to load yaml from string of length 0 with allowed root types (<class 'dict'>,)
2024-04-26 11:06:53,077 - util.py[DEBUG]: loaded blob returned None, returning default.
2024-04-26 11:06:53,079 - util.py[DEBUG]: Reading from /sys/class/net/ens5/address (quiet=False)
2024-04-26 11:06:53,079 - util.py[DEBUG]: Read 18 bytes from /sys/class/net/ens5/address
2024-04-26 11:06:53,079 - util.py[DEBUG]: Reading from /sys/class/net/lo/address (quiet=False)
2024-04-26 11:06:53,079 - util.py[DEBUG]: Read 18 bytes from /sys/class/net/lo/address
2024-04-26 11:06:53,079 - util.py[DEBUG]: Reading from /sys/class/net/ens5/name_assign_type (quiet=False)
2024-04-26 11:06:53,079 - util.py[DEBUG]: Read 2 bytes from /sys/class/net/ens5/name_assign_type
2024-04-26 11:06:53,079 - util.py[DEBUG]: Reading from /sys/class/net/ens5/address (quiet=False)
2024-04-26 11:06:53,080 - util.py[DEBUG]: Read 18 bytes from /sys/class/net/ens5/address
2024-04-26 11:06:53,080 - util.py[DEBUG]: Reading from /sys/class/net/ens5/carrier (quiet=False)
2024-04-26 11:06:53,080 - util.py[DEBUG]: Read 2 bytes from /sys/class/net/ens5/carrier
2024-04-26 11:06:53,080 - util.py[DEBUG]: Reading from /sys/class/net/ens5/addr_assign_type (quiet=False)
2024-04-26 11:06:53,080 - util.py[DEBUG]: Read 2 bytes from /sys/class/net/ens5/addr_assign_type
2024-04-26 11:06:53,080 - util.py[DEBUG]: Reading from /sys/class/net/ens5/uevent (quiet=False)
2024-04-26 11:06:53,080 - util.py[DEBUG]: Read 25 bytes from /sys/class/net/ens5/uevent
2024-04-26 11:06:53,080 - util.py[DEBUG]: Reading from /sys/class/net/ens5/address (quiet=False)
2024-04-26 11:06:53,080 - util.py[DEBUG]: Read 18 bytes from /sys/class/net/ens5/address
2024-04-26 11:06:53,081 - __init__.py[DEBUG]: ovs-vsctl not in PATH; not detecting Open vSwitch interfaces
2024-04-26 11:06:53,081 - util.py[DEBUG]: Reading from /sys/class/net/ens5/device/device (quiet=False)
2024-04-26 11:06:53,081 - util.py[DEBUG]: Read 7 bytes from /sys/class/net/ens5/device/device
2024-04-26 11:06:53,081 - util.py[DEBUG]: Reading from /sys/class/net/lo/addr_assign_type (quiet=False)
2024-04-26 11:06:53,081 - util.py[DEBUG]: Read 2 bytes from /sys/class/net/lo/addr_assign_type
2024-04-26 11:06:53,081 - util.py[DEBUG]: Reading from /sys/class/net/lo/uevent (quiet=False)
2024-04-26 11:06:53,081 - util.py[DEBUG]: Read 23 bytes from /sys/class/net/lo/uevent
2024-04-26 11:06:53,081 - util.py[DEBUG]: Reading from /sys/class/net/lo/address (quiet=False)
2024-04-26 11:06:53,081 - util.py[DEBUG]: Read 18 bytes from /sys/class/net/lo/address
2024-04-26 11:06:53,081 - util.py[DEBUG]: Reading from /sys/class/net/lo/device/device (quiet=False)
2024-04-26 11:06:53,081 - util.py[DEBUG]: Reading from /sys/class/net/ens5/type (quiet=False)
2024-04-26 11:06:53,081 - util.py[DEBUG]: Read 2 bytes from /sys/class/net/ens5/type
2024-04-26 11:06:53,082 - util.py[DEBUG]: Reading from /sys/class/net/lo/type (quiet=False)
2024-04-26 11:06:53,082 - util.py[DEBUG]: Read 4 bytes from /sys/class/net/lo/type
2024-04-26 11:06:53,082 - stages.py[DEBUG]: network config disabled by system_cfg
2024-04-26 11:06:53,082 - stages.py[INFO]: network config is disabled by system_cfg
2024-04-26 11:06:53,082 - handlers.py[DEBUG]: start: init-network/setup-datasource: setting up datasource
2024-04-26 11:06:53,082 - handlers.py[DEBUG]: finish: init-network/setup-datasource: SUCCESS: setting up datasource
2024-04-26 11:06:53,082 - util.py[DEBUG]: Writing to /var/lib/cloud/instances/i-0a5ccc4a0f86755be/user-data.txt - wb: [600] 103 bytes
2024-04-26 11:06:53,083 - util.py[DEBUG]: Restoring selinux mode for /var/lib/cloud/instances/i-0a5ccc4a0f86755be/user-data.txt (recursive=False)
2024-04-26 11:06:53,084 - util.py[DEBUG]: Restoring selinux mode for /var/lib/cloud/instances/i-0a5ccc4a0f86755be/user-data.txt (recursive=False)
2024-04-26 11:06:53,089 - util.py[DEBUG]: Writing to /var/lib/cloud/instances/i-0a5ccc4a0f86755be/user-data.txt.i - wb: [600] 409 bytes
2024-04-26 11:06:53,090 - util.py[DEBUG]: Restoring selinux mode for /var/lib/cloud/instances/i-0a5ccc4a0f86755be/user-data.txt.i (recursive=False)
2024-04-26 11:06:53,092 - util.py[DEBUG]: Restoring selinux mode for /var/lib/cloud/instances/i-0a5ccc4a0f86755be/user-data.txt.i (recursive=False)
2024-04-26 11:06:53,092 - util.py[DEBUG]: Writing to /var/lib/cloud/instances/i-0a5ccc4a0f86755be/vendor-data.txt - wb: [600] 0 bytes
2024-04-26 11:06:53,093 - util.py[DEBUG]: Restoring selinux mode for /var/lib/cloud/instances/i-0a5ccc4a0f86755be/vendor-data.txt (recursive=False)
2024-04-26 11:06:53,094 - util.py[DEBUG]: Restoring selinux mode for /var/lib/cloud/instances/i-0a5ccc4a0f86755be/vendor-data.txt (recursive=False)
2024-04-26 11:06:53,096 - util.py[DEBUG]: Writing to /var/lib/cloud/instances/i-0a5ccc4a0f86755be/vendor-data.txt.i - wb: [600] 308 bytes
2024-04-26 11:06:53,096 - util.py[DEBUG]: Restoring selinux mode for /var/lib/cloud/instances/i-0a5ccc4a0f86755be/vendor-data.txt.i (recursive=False)
2024-04-26 11:06:53,098 - util.py[DEBUG]: Restoring selinux mode for /var/lib/cloud/instances/i-0a5ccc4a0f86755be/vendor-data.txt.i (recursive=False)
2024-04-26 11:06:53,108 - util.py[DEBUG]: Writing to /var/lib/cloud/instances/i-0a5ccc4a0f86755be/vendor-data2.txt - wb: [600] 0 bytes
2024-04-26 11:06:53,109 - util.py[DEBUG]: Restoring selinux mode for /var/lib/cloud/instances/i-0a5ccc4a0f86755be/vendor-data2.txt (recursive=False)
2024-04-26 11:06:53,111 - util.py[DEBUG]: Restoring selinux mode for /var/lib/cloud/instances/i-0a5ccc4a0f86755be/vendor-data2.txt (recursive=False)
2024-04-26 11:06:53,112 - util.py[DEBUG]: Writing to /var/lib/cloud/instances/i-0a5ccc4a0f86755be/vendor-data2.txt.i - wb: [600] 308 bytes
2024-04-26 11:06:53,113 - util.py[DEBUG]: Restoring selinux mode for /var/lib/cloud/instances/i-0a5ccc4a0f86755be/vendor-data2.txt.i (recursive=False)
2024-04-26 11:06:53,114 - util.py[DEBUG]: Restoring selinux mode for /var/lib/cloud/instances/i-0a5ccc4a0f86755be/vendor-data2.txt.i (recursive=False)
2024-04-26 11:06:53,116 - stages.py[DEBUG]: Using distro class <class 'cloudinit.distros.amazon.Distro'>
2024-04-26 11:06:53,117 - cc_set_hostname.py[DEBUG]: Setting the hostname to ip-172-31-18-56.ec2.internal (ip-172-31-18-56)
2024-04-26 11:06:53,117 - subp.py[DEBUG]: Running command ['hostnamectl', 'set-hostname', 'ip-172-31-18-56.ec2.internal'] with allowed return codes [0] (shell=False, capture=True)
2024-04-26 11:06:53,295 - __init__.py[DEBUG]: Non-persistently setting the system hostname to ip-172-31-18-56.ec2.internal
2024-04-26 11:06:53,295 - subp.py[DEBUG]: Running command ['hostname', 'ip-172-31-18-56.ec2.internal'] with allowed return codes [0] (shell=False, capture=True)
2024-04-26 11:06:53,316 - atomic_helper.py[DEBUG]: Atomically writing to file /var/lib/cloud/data/set-hostname (via temporary file /var/lib/cloud/data/tmpdafeo95y) - w: [644] 76 bytes/chars
2024-04-26 11:06:53,317 - util.py[DEBUG]: Writing to /var/lib/cloud/instances/i-0a5ccc4a0f86755be/sem/consume_data - wb: [644] 25 bytes
2024-04-26 11:06:53,318 - util.py[DEBUG]: Restoring selinux mode for /var/lib/cloud/instances/i-0a5ccc4a0f86755be/sem/consume_data (recursive=False)
2024-04-26 11:06:53,320 - util.py[DEBUG]: Restoring selinux mode for /var/lib/cloud/instances/i-0a5ccc4a0f86755be/sem/consume_data (recursive=False)
2024-04-26 11:06:53,321 - helpers.py[DEBUG]: Running consume_data using lock (<FileLock using file '/var/lib/cloud/instances/i-0a5ccc4a0f86755be/sem/consume_data'>)
2024-04-26 11:06:53,321 - handlers.py[DEBUG]: start: init-network/consume-user-data: reading and applying user-data
2024-04-26 11:06:53,322 - launch_index.py[DEBUG]: Discarding 0 multipart messages which do not match launch index 0
2024-04-26 11:06:53,322 - stages.py[DEBUG]: Added default handler for {'text/cloud-config', 'text/cloud-config-jsonp'} from CloudConfigPartHandler: [['text/cloud-config', 'text/cloud-config-jsonp']]
2024-04-26 11:06:53,322 - stages.py[DEBUG]: Added default handler for {'text/x-shellscript'} from ShellScriptPartHandler: [['text/x-shellscript']]
2024-04-26 11:06:53,323 - stages.py[DEBUG]: Added default handler for {'text/x-shellscript-per-boot'} from ShellScriptByFreqPartHandler: [['text/x-shellscript-per-boot']]
2024-04-26 11:06:53,323 - stages.py[DEBUG]: Added default handler for {'text/x-shellscript-per-instance'} from ShellScriptByFreqPartHandler: [['text/x-shellscript-per-instance']]
2024-04-26 11:06:53,323 - stages.py[DEBUG]: Added default handler for {'text/x-shellscript-per-once'} from ShellScriptByFreqPartHandler: [['text/x-shellscript-per-once']]
2024-04-26 11:06:53,323 - stages.py[DEBUG]: Added default handler for {'text/cloud-boothook'} from BootHookPartHandler: [['text/cloud-boothook']]
2024-04-26 11:06:53,323 - stages.py[DEBUG]: Added default handler for {'text/jinja2'} from JinjaTemplatePartHandler: [['text/jinja2']]
2024-04-26 11:06:53,323 - __init__.py[DEBUG]: Calling handler CloudConfigPartHandler: [['text/cloud-config', 'text/cloud-config-jsonp']] (__begin__, None, 3) with frequency once-per-instance
2024-04-26 11:06:53,323 - __init__.py[DEBUG]: Calling handler ShellScriptPartHandler: [['text/x-shellscript']] (__begin__, None, 2) with frequency once-per-instance
2024-04-26 11:06:53,323 - __init__.py[DEBUG]: Calling handler ShellScriptByFreqPartHandler: [['text/x-shellscript-per-boot']] (__begin__, None, 2) with frequency once-per-instance
2024-04-26 11:06:53,323 - __init__.py[DEBUG]: Calling handler ShellScriptByFreqPartHandler: [['text/x-shellscript-per-instance']] (__begin__, None, 2) with frequency once-per-instance
2024-04-26 11:06:53,323 - __init__.py[DEBUG]: Calling handler ShellScriptByFreqPartHandler: [['text/x-shellscript-per-once']] (__begin__, None, 2) with frequency once-per-instance
2024-04-26 11:06:53,323 - __init__.py[DEBUG]: Calling handler BootHookPartHandler: [['text/cloud-boothook']] (__begin__, None, 2) with frequency once-per-instance
2024-04-26 11:06:53,323 - __init__.py[DEBUG]: Calling handler JinjaTemplatePartHandler: [['text/jinja2']] (__begin__, None, 3) with frequency once-per-instance
2024-04-26 11:06:53,323 - __init__.py[DEBUG]: {'MIME-Version': '1.0', 'Content-Type': 'text/x-shellscript', 'Content-Disposition': 'attachment; filename="part-001"'}
2024-04-26 11:06:53,324 - __init__.py[DEBUG]: Calling handler ShellScriptPartHandler: [['text/x-shellscript']] (text/x-shellscript, part-001, 2) with frequency once-per-instance
2024-04-26 11:06:53,324 - util.py[DEBUG]: Writing to /var/lib/cloud/instance/scripts/part-001 - wb: [700] 103 bytes
2024-04-26 11:06:53,325 - util.py[DEBUG]: Restoring selinux mode for /var/lib/cloud/instances/i-0a5ccc4a0f86755be/scripts/part-001 (recursive=False)
2024-04-26 11:06:53,326 - util.py[DEBUG]: Restoring selinux mode for /var/lib/cloud/instances/i-0a5ccc4a0f86755be/scripts/part-001 (recursive=False)
2024-04-26 11:06:53,326 - __init__.py[DEBUG]: Calling handler CloudConfigPartHandler: [['text/cloud-config', 'text/cloud-config-jsonp']] (__end__, None, 3) with frequency once-per-instance
2024-04-26 11:06:53,326 - util.py[DEBUG]: Writing to /var/lib/cloud/instances/i-0a5ccc4a0f86755be/cloud-config.txt - wb: [600] 0 bytes
2024-04-26 11:06:53,327 - util.py[DEBUG]: Restoring selinux mode for /var/lib/cloud/instances/i-0a5ccc4a0f86755be/cloud-config.txt (recursive=False)
2024-04-26 11:06:53,338 - util.py[DEBUG]: Restoring selinux mode for /var/lib/cloud/instances/i-0a5ccc4a0f86755be/cloud-config.txt (recursive=False)
2024-04-26 11:06:53,339 - __init__.py[DEBUG]: Calling handler ShellScriptPartHandler: [['text/x-shellscript']] (__end__, None, 2) with frequency once-per-instance
2024-04-26 11:06:53,339 - __init__.py[DEBUG]: Calling handler ShellScriptByFreqPartHandler: [['text/x-shellscript-per-boot']] (__end__, None, 2) with frequency once-per-instance
2024-04-26 11:06:53,339 - __init__.py[DEBUG]: Calling handler ShellScriptByFreqPartHandler: [['text/x-shellscript-per-instance']] (__end__, None, 2) with frequency once-per-instance
2024-04-26 11:06:53,339 - __init__.py[DEBUG]: Calling handler ShellScriptByFreqPartHandler: [['text/x-shellscript-per-once']] (__end__, None, 2) with frequency once-per-instance
2024-04-26 11:06:53,339 - __init__.py[DEBUG]: Calling handler BootHookPartHandler: [['text/cloud-boothook']] (__end__, None, 2) with frequency once-per-instance
2024-04-26 11:06:53,339 - __init__.py[DEBUG]: Calling handler JinjaTemplatePartHandler: [['text/jinja2']] (__end__, None, 3) with frequency once-per-instance
2024-04-26 11:06:53,340 - handlers.py[DEBUG]: finish: init-network/consume-user-data: SUCCESS: reading and applying user-data
2024-04-26 11:06:53,340 - handlers.py[DEBUG]: start: init-network/consume-vendor-data: reading and applying vendor-data
2024-04-26 11:06:53,340 - stages.py[DEBUG]: no vendordata from datasource
2024-04-26 11:06:53,340 - handlers.py[DEBUG]: finish: init-network/consume-vendor-data: SUCCESS: reading and applying vendor-data
2024-04-26 11:06:53,340 - handlers.py[DEBUG]: start: init-network/consume-vendor-data2: reading and applying vendor-data2
2024-04-26 11:06:53,340 - stages.py[DEBUG]: no vendordata2 from datasource
2024-04-26 11:06:53,340 - handlers.py[DEBUG]: finish: init-network/consume-vendor-data2: SUCCESS: reading and applying vendor-data2
2024-04-26 11:06:53,340 - util.py[DEBUG]: Reading from /etc/cloud/cloud.cfg (quiet=False)
2024-04-26 11:06:53,340 - util.py[DEBUG]: Read 2553 bytes from /etc/cloud/cloud.cfg
2024-04-26 11:06:53,340 - util.py[DEBUG]: Attempting to load yaml from string of length 2553 with allowed root types (<class 'dict'>,)
2024-04-26 11:06:53,355 - util.py[DEBUG]: Reading from /etc/cloud/cloud.cfg.d/40_selinux-reboot.cfg (quiet=False)
2024-04-26 11:06:53,355 - util.py[DEBUG]: Read 174 bytes from /etc/cloud/cloud.cfg.d/40_selinux-reboot.cfg
2024-04-26 11:06:53,355 - util.py[DEBUG]: Attempting to load yaml from string of length 174 with allowed root types (<class 'dict'>,)
2024-04-26 11:06:53,356 - util.py[DEBUG]: Reading from /etc/cloud/cloud.cfg.d/10_aws_dnfvars.cfg (quiet=False)
2024-04-26 11:06:53,356 - util.py[DEBUG]: Read 591 bytes from /etc/cloud/cloud.cfg.d/10_aws_dnfvars.cfg
2024-04-26 11:06:53,356 - util.py[DEBUG]: Attempting to load yaml from string of length 591 with allowed root types (<class 'dict'>,)
2024-04-26 11:06:53,369 - util.py[DEBUG]: Reading from /etc/cloud/cloud.cfg.d/05_logging.cfg (quiet=False)
2024-04-26 11:06:53,370 - util.py[DEBUG]: Read 2070 bytes from /etc/cloud/cloud.cfg.d/05_logging.cfg
2024-04-26 11:06:53,370 - util.py[DEBUG]: Attempting to load yaml from string of length 2070 with allowed root types (<class 'dict'>,)
2024-04-26 11:06:53,376 - util.py[DEBUG]: Reading from /etc/cloud/cloud.cfg.d/01_amazon-ec2.cfg (quiet=False)
2024-04-26 11:06:53,376 - util.py[DEBUG]: Read 237 bytes from /etc/cloud/cloud.cfg.d/01_amazon-ec2.cfg
2024-04-26 11:06:53,376 - util.py[DEBUG]: Attempting to load yaml from string of length 237 with allowed root types (<class 'dict'>,)
2024-04-26 11:06:53,382 - util.py[DEBUG]: Reading from /run/cloud-init/cloud.cfg (quiet=False)
2024-04-26 11:06:53,382 - util.py[DEBUG]: Attempting to load yaml from string of length 0 with allowed root types (<class 'dict'>,)
2024-04-26 11:06:53,382 - util.py[DEBUG]: loaded blob returned None, returning default.
2024-04-26 11:06:53,383 - util.py[DEBUG]: Reading from /var/lib/cloud/instance/cloud-config.txt (quiet=False)
2024-04-26 11:06:53,383 - util.py[DEBUG]: Read 0 bytes from /var/lib/cloud/instance/cloud-config.txt
2024-04-26 11:06:53,383 - util.py[DEBUG]: Attempting to load yaml from string of length 0 with allowed root types (<class 'dict'>,)
2024-04-26 11:06:53,383 - util.py[DEBUG]: loaded blob returned None, returning default.
2024-04-26 11:06:53,384 - util.py[DEBUG]: Reading from /usr/lib/python3.9/site-packages/cloudinit/config/schemas/schema-cloud-config-v1.json (quiet=False)
2024-04-26 11:06:53,384 - util.py[DEBUG]: Read 102081 bytes from /usr/lib/python3.9/site-packages/cloudinit/config/schemas/schema-cloud-config-v1.json
2024-04-26 11:06:53,539 - util.py[DEBUG]: Reading from /var/lib/cloud/instance/cloud-config.txt (quiet=False)
2024-04-26 11:06:53,540 - util.py[DEBUG]: Read 0 bytes from /var/lib/cloud/instance/cloud-config.txt
2024-04-26 11:06:53,540 - util.py[DEBUG]: Attempting to load yaml from string of length 0 with allowed root types (<class 'dict'>,)
2024-04-26 11:06:53,540 - util.py[DEBUG]: loaded blob returned None, returning default.
2024-04-26 11:06:53,544 - handlers.py[DEBUG]: start: init-network/activate-datasource: activating datasource
2024-04-26 11:06:53,546 - util.py[DEBUG]: Writing to /var/lib/cloud/instance/obj.pkl - wb: [400] 12517 bytes
2024-04-26 11:06:53,559 - util.py[DEBUG]: Restoring selinux mode for /var/lib/cloud/instances/i-0a5ccc4a0f86755be/obj.pkl (recursive=False)
2024-04-26 11:06:53,561 - util.py[DEBUG]: Restoring selinux mode for /var/lib/cloud/instances/i-0a5ccc4a0f86755be/obj.pkl (recursive=False)
2024-04-26 11:06:53,562 - handlers.py[DEBUG]: finish: init-network/activate-datasource: SUCCESS: activating datasource
2024-04-26 11:06:53,562 - main.py[DEBUG]: no di_report found in config.
2024-04-26 11:06:53,564 - util.py[DEBUG]: Reading from /usr/lib/python3.9/site-packages/cloudinit/config/schemas/schema-cloud-config-v1.json (quiet=False)
2024-04-26 11:06:53,565 - util.py[DEBUG]: Read 102081 bytes from /usr/lib/python3.9/site-packages/cloudinit/config/schemas/schema-cloud-config-v1.json
2024-04-26 11:06:53,572 - util.py[DEBUG]: Reading from /usr/lib/python3.9/site-packages/cloudinit/config/schemas/schema-cloud-config-v1.json (quiet=False)
2024-04-26 11:06:53,572 - util.py[DEBUG]: Read 102081 bytes from /usr/lib/python3.9/site-packages/cloudinit/config/schemas/schema-cloud-config-v1.json
2024-04-26 11:06:53,576 - util.py[DEBUG]: Reading from /usr/lib/python3.9/site-packages/cloudinit/config/schemas/schema-cloud-config-v1.json (quiet=False)
2024-04-26 11:06:53,576 - util.py[DEBUG]: Read 102081 bytes from /usr/lib/python3.9/site-packages/cloudinit/config/schemas/schema-cloud-config-v1.json
2024-04-26 11:06:53,580 - util.py[DEBUG]: Reading from /usr/lib/python3.9/site-packages/cloudinit/config/schemas/schema-cloud-config-v1.json (quiet=False)
2024-04-26 11:06:53,580 - util.py[DEBUG]: Read 102081 bytes from /usr/lib/python3.9/site-packages/cloudinit/config/schemas/schema-cloud-config-v1.json
2024-04-26 11:06:53,588 - util.py[DEBUG]: Reading from /usr/lib/python3.9/site-packages/cloudinit/config/schemas/schema-cloud-config-v1.json (quiet=False)
2024-04-26 11:06:53,589 - util.py[DEBUG]: Read 102081 bytes from /usr/lib/python3.9/site-packages/cloudinit/config/schemas/schema-cloud-config-v1.json
2024-04-26 11:06:53,592 - util.py[DEBUG]: Reading from /usr/lib/python3.9/site-packages/cloudinit/config/schemas/schema-cloud-config-v1.json (quiet=False)
2024-04-26 11:06:53,593 - util.py[DEBUG]: Read 102081 bytes from /usr/lib/python3.9/site-packages/cloudinit/config/schemas/schema-cloud-config-v1.json
2024-04-26 11:06:53,597 - util.py[DEBUG]: Reading from /usr/lib/python3.9/site-packages/cloudinit/config/schemas/schema-cloud-config-v1.json (quiet=False)
2024-04-26 11:06:53,597 - util.py[DEBUG]: Read 102081 bytes from /usr/lib/python3.9/site-packages/cloudinit/config/schemas/schema-cloud-config-v1.json
2024-04-26 11:06:53,610 - util.py[DEBUG]: Reading from /usr/lib/python3.9/site-packages/cloudinit/config/schemas/schema-cloud-config-v1.json (quiet=False)
2024-04-26 11:06:53,610 - util.py[DEBUG]: Read 102081 bytes from /usr/lib/python3.9/site-packages/cloudinit/config/schemas/schema-cloud-config-v1.json
2024-04-26 11:06:53,613 - util.py[DEBUG]: Reading from /usr/lib/python3.9/site-packages/cloudinit/config/schemas/schema-cloud-config-v1.json (quiet=False)
2024-04-26 11:06:53,614 - util.py[DEBUG]: Read 102081 bytes from /usr/lib/python3.9/site-packages/cloudinit/config/schemas/schema-cloud-config-v1.json
2024-04-26 11:06:53,618 - util.py[DEBUG]: Reading from /usr/lib/python3.9/site-packages/cloudinit/config/schemas/schema-cloud-config-v1.json (quiet=False)
2024-04-26 11:06:53,619 - util.py[DEBUG]: Read 102081 bytes from /usr/lib/python3.9/site-packages/cloudinit/config/schemas/schema-cloud-config-v1.json
2024-04-26 11:06:53,622 - util.py[DEBUG]: Reading from /usr/lib/python3.9/site-packages/cloudinit/config/schemas/schema-cloud-config-v1.json (quiet=False)
2024-04-26 11:06:53,622 - util.py[DEBUG]: Read 102081 bytes from /usr/lib/python3.9/site-packages/cloudinit/config/schemas/schema-cloud-config-v1.json
2024-04-26 11:06:53,628 - util.py[DEBUG]: Reading from /usr/lib/python3.9/site-packages/cloudinit/config/schemas/schema-cloud-config-v1.json (quiet=False)
2024-04-26 11:06:53,628 - util.py[DEBUG]: Read 102081 bytes from /usr/lib/python3.9/site-packages/cloudinit/config/schemas/schema-cloud-config-v1.json
2024-04-26 11:06:53,631 - util.py[DEBUG]: Reading from /usr/lib/python3.9/site-packages/cloudinit/config/schemas/schema-cloud-config-v1.json (quiet=False)
2024-04-26 11:06:53,631 - util.py[DEBUG]: Read 102081 bytes from /usr/lib/python3.9/site-packages/cloudinit/config/schemas/schema-cloud-config-v1.json
2024-04-26 11:06:53,638 - util.py[DEBUG]: Reading from /usr/lib/python3.9/site-packages/cloudinit/config/schemas/schema-cloud-config-v1.json (quiet=False)
2024-04-26 11:06:53,638 - util.py[DEBUG]: Read 102081 bytes from /usr/lib/python3.9/site-packages/cloudinit/config/schemas/schema-cloud-config-v1.json
2024-04-26 11:06:53,643 - util.py[DEBUG]: Reading from /usr/lib/python3.9/site-packages/cloudinit/config/schemas/schema-cloud-config-v1.json (quiet=False)
2024-04-26 11:06:53,643 - util.py[DEBUG]: Read 102081 bytes from /usr/lib/python3.9/site-packages/cloudinit/config/schemas/schema-cloud-config-v1.json
2024-04-26 11:06:53,647 - util.py[DEBUG]: Reading from /usr/lib/python3.9/site-packages/cloudinit/config/schemas/schema-cloud-config-v1.json (quiet=False)
2024-04-26 11:06:53,647 - util.py[DEBUG]: Read 102081 bytes from /usr/lib/python3.9/site-packages/cloudinit/config/schemas/schema-cloud-config-v1.json
2024-04-26 11:06:53,650 - stages.py[DEBUG]: Using distro class <class 'cloudinit.distros.amazon.Distro'>
2024-04-26 11:06:53,651 - modules.py[DEBUG]: Running module migrator (<module 'cloudinit.config.cc_migrator' from '/usr/lib/python3.9/site-packages/cloudinit/config/cc_migrator.py'>) with frequency always
2024-04-26 11:06:53,651 - handlers.py[DEBUG]: start: init-network/config-migrator: running config-migrator with frequency always
2024-04-26 11:06:53,651 - helpers.py[DEBUG]: Running config-migrator using lock (<cloudinit.helpers.DummyLock object at 0x7f59e5d47d30>)
2024-04-26 11:06:53,651 - cc_migrator.py[DEBUG]: Migrated 0 semaphore files to there canonicalized names
2024-04-26 11:06:53,651 - handlers.py[DEBUG]: finish: init-network/config-migrator: SUCCESS: config-migrator ran successfully
2024-04-26 11:06:53,652 - modules.py[DEBUG]: Running module seed_random (<module 'cloudinit.config.cc_seed_random' from '/usr/lib/python3.9/site-packages/cloudinit/config/cc_seed_random.py'>) with frequency once-per-instance
2024-04-26 11:06:53,652 - handlers.py[DEBUG]: start: init-network/config-seed_random: running config-seed_random with frequency once-per-instance
2024-04-26 11:06:53,652 - util.py[DEBUG]: Writing to /var/lib/cloud/instances/i-0a5ccc4a0f86755be/sem/config_seed_random - wb: [644] 25 bytes
2024-04-26 11:06:53,653 - util.py[DEBUG]: Restoring selinux mode for /var/lib/cloud/instances/i-0a5ccc4a0f86755be/sem/config_seed_random (recursive=False)
2024-04-26 11:06:53,654 - util.py[DEBUG]: Restoring selinux mode for /var/lib/cloud/instances/i-0a5ccc4a0f86755be/sem/config_seed_random (recursive=False)
2024-04-26 11:06:53,655 - helpers.py[DEBUG]: Running config-seed_random using lock (<FileLock using file '/var/lib/cloud/instances/i-0a5ccc4a0f86755be/sem/config_seed_random'>)
2024-04-26 11:06:53,655 - cc_seed_random.py[DEBUG]: no command provided
2024-04-26 11:06:53,655 - handlers.py[DEBUG]: finish: init-network/config-seed_random: SUCCESS: config-seed_random ran successfully
2024-04-26 11:06:53,655 - modules.py[DEBUG]: Running module bootcmd (<module 'cloudinit.config.cc_bootcmd' from '/usr/lib/python3.9/site-packages/cloudinit/config/cc_bootcmd.py'>) with frequency always
2024-04-26 11:06:53,655 - handlers.py[DEBUG]: start: init-network/config-bootcmd: running config-bootcmd with frequency always
2024-04-26 11:06:53,655 - helpers.py[DEBUG]: Running config-bootcmd using lock (<cloudinit.helpers.DummyLock object at 0x7f59e5d47d30>)
2024-04-26 11:06:53,655 - cc_bootcmd.py[DEBUG]: Skipping module named bootcmd, no 'bootcmd' key in configuration
2024-04-26 11:06:53,655 - handlers.py[DEBUG]: finish: init-network/config-bootcmd: SUCCESS: config-bootcmd ran successfully
2024-04-26 11:06:53,655 - modules.py[DEBUG]: Running module write-files (<module 'cloudinit.config.cc_write_files' from '/usr/lib/python3.9/site-packages/cloudinit/config/cc_write_files.py'>) with frequency once-per-instance
2024-04-26 11:06:53,656 - handlers.py[DEBUG]: start: init-network/config-write-files: running config-write-files with frequency once-per-instance
2024-04-26 11:06:53,656 - util.py[DEBUG]: Writing to /var/lib/cloud/instances/i-0a5ccc4a0f86755be/sem/config_write_files - wb: [644] 25 bytes
2024-04-26 11:06:53,657 - util.py[DEBUG]: Restoring selinux mode for /var/lib/cloud/instances/i-0a5ccc4a0f86755be/sem/config_write_files (recursive=False)
2024-04-26 11:06:53,658 - util.py[DEBUG]: Restoring selinux mode for /var/lib/cloud/instances/i-0a5ccc4a0f86755be/sem/config_write_files (recursive=False)
2024-04-26 11:06:53,658 - helpers.py[DEBUG]: Running config-write-files using lock (<FileLock using file '/var/lib/cloud/instances/i-0a5ccc4a0f86755be/sem/config_write_files'>)
2024-04-26 11:06:53,658 - cc_write_files.py[DEBUG]: Skipping module named write-files, no/empty 'write_files' key in configuration
2024-04-26 11:06:53,658 - handlers.py[DEBUG]: finish: init-network/config-write-files: SUCCESS: config-write-files ran successfully
2024-04-26 11:06:53,659 - modules.py[DEBUG]: Running module write-metadata (<module 'cloudinit.config.cc_write_metadata' from '/usr/lib/python3.9/site-packages/cloudinit/config/cc_write_metadata.py'>) with frequency once-per-instance
2024-04-26 11:06:53,659 - handlers.py[DEBUG]: start: init-network/config-write-metadata: running config-write-metadata with frequency once-per-instance
2024-04-26 11:06:53,659 - util.py[DEBUG]: Writing to /var/lib/cloud/instances/i-0a5ccc4a0f86755be/sem/config_write_metadata - wb: [644] 25 bytes
2024-04-26 11:06:53,660 - util.py[DEBUG]: Restoring selinux mode for /var/lib/cloud/instances/i-0a5ccc4a0f86755be/sem/config_write_metadata (recursive=False)
2024-04-26 11:06:53,661 - util.py[DEBUG]: Restoring selinux mode for /var/lib/cloud/instances/i-0a5ccc4a0f86755be/sem/config_write_metadata (recursive=False)
2024-04-26 11:06:53,661 - helpers.py[DEBUG]: Running config-write-metadata using lock (<FileLock using file '/var/lib/cloud/instances/i-0a5ccc4a0f86755be/sem/config_write_metadata'>)
2024-04-26 11:06:53,661 - util.py[DEBUG]: Writing to /etc/dnf/vars/awsregion - wb: [644] 9 bytes
2024-04-26 11:06:53,665 - util.py[DEBUG]: Restoring selinux mode for /etc/dnf/vars/awsregion (recursive=False)
2024-04-26 11:06:53,666 - util.py[DEBUG]: Restoring selinux mode for /etc/dnf/vars/awsregion (recursive=False)
2024-04-26 11:06:53,678 - util.py[DEBUG]: Changing the ownership of /etc/dnf/vars/awsregion to 0:0
2024-04-26 11:06:53,678 - util.py[DEBUG]: Writing to /etc/dnf/vars/awsdomain - wb: [644] 13 bytes
2024-04-26 11:06:53,679 - util.py[DEBUG]: Restoring selinux mode for /etc/dnf/vars/awsdomain (recursive=False)
2024-04-26 11:06:53,680 - util.py[DEBUG]: Restoring selinux mode for /etc/dnf/vars/awsdomain (recursive=False)
2024-04-26 11:06:53,680 - util.py[DEBUG]: Changing the ownership of /etc/dnf/vars/awsdomain to 0:0
2024-04-26 11:06:53,680 - handlers.py[DEBUG]: finish: init-network/config-write-metadata: SUCCESS: config-write-metadata ran successfully
2024-04-26 11:06:53,681 - modules.py[DEBUG]: Running module growpart (<module 'cloudinit.config.cc_growpart' from '/usr/lib/python3.9/site-packages/cloudinit/config/cc_growpart.py'>) with frequency always
2024-04-26 11:06:53,681 - handlers.py[DEBUG]: start: init-network/config-growpart: running config-growpart with frequency always
2024-04-26 11:06:53,681 - helpers.py[DEBUG]: Running config-growpart using lock (<cloudinit.helpers.DummyLock object at 0x7f59e5d47f40>)
2024-04-26 11:06:53,681 - cc_growpart.py[DEBUG]: No 'growpart' entry in cfg.  Using default: {'mode': 'auto', 'devices': ['/'], 'ignore_growroot_disabled': False}
2024-04-26 11:06:53,681 - subp.py[DEBUG]: Running command ['growpart', '--help'] with allowed return codes [0] (shell=False, capture=True)
2024-04-26 11:06:53,711 - util.py[DEBUG]: Reading from /proc/1464/mountinfo (quiet=False)
2024-04-26 11:06:53,712 - util.py[DEBUG]: Read 2940 bytes from /proc/1464/mountinfo
2024-04-26 11:06:53,712 - util.py[DEBUG]: Reading from /sys/class/block/nvme0n1p1/partition (quiet=False)
2024-04-26 11:06:53,712 - util.py[DEBUG]: Read 2 bytes from /sys/class/block/nvme0n1p1/partition
2024-04-26 11:06:53,712 - util.py[DEBUG]: Reading from /sys/devices/pci0000:00/0000:00:04.0/nvme/nvme0/nvme0n1/dev (quiet=False)
2024-04-26 11:06:53,712 - util.py[DEBUG]: Read 6 bytes from /sys/devices/pci0000:00/0000:00:04.0/nvme/nvme0/nvme0n1/dev
2024-04-26 11:06:53,713 - subp.py[DEBUG]: Running command ['growpart', '--dry-run', '/dev/nvme0n1', '1'] with allowed return codes [0] (shell=False, capture=True)
2024-04-26 11:06:53,843 - util.py[DEBUG]: resize_devices took 0.132 seconds
2024-04-26 11:06:53,843 - cc_growpart.py[DEBUG]: '/' NOCHANGE: no change necessary (/dev/nvme0n1, 1)
2024-04-26 11:06:53,843 - handlers.py[DEBUG]: finish: init-network/config-growpart: SUCCESS: config-growpart ran successfully
2024-04-26 11:06:53,843 - modules.py[DEBUG]: Running module resizefs (<module 'cloudinit.config.cc_resizefs' from '/usr/lib/python3.9/site-packages/cloudinit/config/cc_resizefs.py'>) with frequency always
2024-04-26 11:06:53,844 - handlers.py[DEBUG]: start: init-network/config-resizefs: running config-resizefs with frequency always
2024-04-26 11:06:53,844 - helpers.py[DEBUG]: Running config-resizefs using lock (<cloudinit.helpers.DummyLock object at 0x7f59e5d47d30>)
2024-04-26 11:06:53,844 - util.py[DEBUG]: Reading from /proc/1464/mountinfo (quiet=False)
2024-04-26 11:06:53,844 - util.py[DEBUG]: Read 2940 bytes from /proc/1464/mountinfo
2024-04-26 11:06:53,844 - cc_resizefs.py[DEBUG]: resize_info: dev=/dev/nvme0n1p1 mnt_point=/ path=/
2024-04-26 11:06:53,844 - cc_resizefs.py[DEBUG]: Resizing / (xfs) using xfs_growfs /
2024-04-26 11:06:53,846 - util.py[DEBUG]: Forked child 1598 who will run callback log_time
2024-04-26 11:06:53,846 - cc_resizefs.py[DEBUG]: Resizing (via forking) root filesystem (type=xfs, val=noblock)
2024-04-26 11:06:53,847 - handlers.py[DEBUG]: finish: init-network/config-resizefs: SUCCESS: config-resizefs ran successfully
2024-04-26 11:06:53,847 - modules.py[DEBUG]: Running module disk_setup (<module 'cloudinit.config.cc_disk_setup' from '/usr/lib/python3.9/site-packages/cloudinit/config/cc_disk_setup.py'>) with frequency once-per-instance
2024-04-26 11:06:53,848 - handlers.py[DEBUG]: start: init-network/config-disk_setup: running config-disk_setup with frequency once-per-instance
2024-04-26 11:06:53,859 - util.py[DEBUG]: Writing to /var/lib/cloud/instances/i-0a5ccc4a0f86755be/sem/config_disk_setup - wb: [644] 24 bytes
2024-04-26 11:06:53,860 - util.py[DEBUG]: Restoring selinux mode for /var/lib/cloud/instances/i-0a5ccc4a0f86755be/sem/config_disk_setup (recursive=False)
2024-04-26 11:06:53,863 - util.py[DEBUG]: Restoring selinux mode for /var/lib/cloud/instances/i-0a5ccc4a0f86755be/sem/config_disk_setup (recursive=False)
2024-04-26 11:06:53,863 - helpers.py[DEBUG]: Running config-disk_setup using lock (<FileLock using file '/var/lib/cloud/instances/i-0a5ccc4a0f86755be/sem/config_disk_setup'>)
2024-04-26 11:06:53,863 - handlers.py[DEBUG]: finish: init-network/config-disk_setup: SUCCESS: config-disk_setup ran successfully
2024-04-26 11:06:53,863 - modules.py[DEBUG]: Running module mounts (<module 'cloudinit.config.cc_mounts' from '/usr/lib/python3.9/site-packages/cloudinit/config/cc_mounts.py'>) with frequency once-per-instance
2024-04-26 11:06:53,864 - handlers.py[DEBUG]: start: init-network/config-mounts: running config-mounts with frequency once-per-instance
2024-04-26 11:06:53,864 - util.py[DEBUG]: Writing to /var/lib/cloud/instances/i-0a5ccc4a0f86755be/sem/config_mounts - wb: [644] 24 bytes
2024-04-26 11:06:53,865 - util.py[DEBUG]: Restoring selinux mode for /var/lib/cloud/instances/i-0a5ccc4a0f86755be/sem/config_mounts (recursive=False)
2024-04-26 11:06:53,866 - util.py[DEBUG]: Restoring selinux mode for /var/lib/cloud/instances/i-0a5ccc4a0f86755be/sem/config_mounts (recursive=False)
2024-04-26 11:06:53,867 - helpers.py[DEBUG]: Running config-mounts using lock (<FileLock using file '/var/lib/cloud/instances/i-0a5ccc4a0f86755be/sem/config_mounts'>)
2024-04-26 11:06:53,867 - cc_mounts.py[DEBUG]: mounts configuration is []
2024-04-26 11:06:53,867 - util.py[DEBUG]: Reading from /etc/fstab (quiet=False)
2024-04-26 11:06:53,869 - subp.py[DEBUG]: Running command ('xfs_growfs', '/') with allowed return codes [0] (shell=False, capture=True)
2024-04-26 11:06:53,868 - util.py[DEBUG]: Read 217 bytes from /etc/fstab
2024-04-26 11:06:53,872 - cc_mounts.py[DEBUG]: Attempting to determine the real name of ephemeral0
2024-04-26 11:06:53,873 - DataSourceEc2.py[DEBUG]: Unable to convert ephemeral0 to a device
2024-04-26 11:06:53,873 - cc_mounts.py[DEBUG]: changed default device ephemeral0 => None
2024-04-26 11:06:53,873 - cc_mounts.py[DEBUG]: Ignoring nonexistent default named mount ephemeral0
2024-04-26 11:06:53,873 - cc_mounts.py[DEBUG]: Attempting to determine the real name of swap
2024-04-26 11:06:53,873 - DataSourceEc2.py[DEBUG]: Unable to convert swap to a device
2024-04-26 11:06:53,873 - cc_mounts.py[DEBUG]: changed default device swap => None
2024-04-26 11:06:53,873 - cc_mounts.py[DEBUG]: Ignoring nonexistent default named mount swap
2024-04-26 11:06:53,873 - cc_mounts.py[DEBUG]: no need to setup swap
2024-04-26 11:06:53,873 - cc_mounts.py[DEBUG]: No modifications to fstab needed
2024-04-26 11:06:53,873 - handlers.py[DEBUG]: finish: init-network/config-mounts: SUCCESS: config-mounts ran successfully
2024-04-26 11:06:53,873 - modules.py[DEBUG]: Running module set_hostname (<module 'cloudinit.config.cc_set_hostname' from '/usr/lib/python3.9/site-packages/cloudinit/config/cc_set_hostname.py'>) with frequency always
2024-04-26 11:06:53,873 - handlers.py[DEBUG]: start: init-network/config-set_hostname: running config-set_hostname with frequency always
2024-04-26 11:06:53,874 - helpers.py[DEBUG]: Running config-set_hostname using lock (<cloudinit.helpers.DummyLock object at 0x7f59e5d58dc0>)
2024-04-26 11:06:53,874 - util.py[DEBUG]: Reading from /var/lib/cloud/data/set-hostname (quiet=False)
2024-04-26 11:06:53,874 - util.py[DEBUG]: Read 76 bytes from /var/lib/cloud/data/set-hostname
2024-04-26 11:06:53,874 - cc_set_hostname.py[DEBUG]: No hostname changes. Skipping set-hostname
2024-04-26 11:06:53,874 - handlers.py[DEBUG]: finish: init-network/config-set_hostname: SUCCESS: config-set_hostname ran successfully
2024-04-26 11:06:53,874 - modules.py[DEBUG]: Running module update_hostname (<module 'cloudinit.config.cc_update_hostname' from '/usr/lib/python3.9/site-packages/cloudinit/config/cc_update_hostname.py'>) with frequency always
2024-04-26 11:06:53,875 - handlers.py[DEBUG]: start: init-network/config-update_hostname: running config-update_hostname with frequency always
2024-04-26 11:06:53,875 - helpers.py[DEBUG]: Running config-update_hostname using lock (<cloudinit.helpers.DummyLock object at 0x7f59e5d58280>)
2024-04-26 11:06:53,875 - cc_update_hostname.py[DEBUG]: Updating hostname to ip-172-31-18-56.ec2.internal (ip-172-31-18-56)
2024-04-26 11:06:53,875 - subp.py[DEBUG]: Running command ['hostname'] with allowed return codes [0] (shell=False, capture=True)
2024-04-26 11:06:53,888 - __init__.py[DEBUG]: Attempting to update hostname to ip-172-31-18-56.ec2.internal in 1 files
2024-04-26 11:06:53,889 - util.py[DEBUG]: Writing to /var/lib/cloud/data/previous-hostname - wb: [644] 28 bytes
2024-04-26 11:06:53,890 - util.py[DEBUG]: Restoring selinux mode for /var/lib/cloud/data/previous-hostname (recursive=False)
2024-04-26 11:06:53,892 - util.py[DEBUG]: Restoring selinux mode for /var/lib/cloud/data/previous-hostname (recursive=False)
2024-04-26 11:06:53,893 - handlers.py[DEBUG]: finish: init-network/config-update_hostname: SUCCESS: config-update_hostname ran successfully
2024-04-26 11:06:53,893 - modules.py[DEBUG]: Running module update_etc_hosts (<module 'cloudinit.config.cc_update_etc_hosts' from '/usr/lib/python3.9/site-packages/cloudinit/config/cc_update_etc_hosts.py'>) with frequency always
2024-04-26 11:06:53,893 - handlers.py[DEBUG]: start: init-network/config-update_etc_hosts: running config-update_etc_hosts with frequency always
2024-04-26 11:06:53,893 - helpers.py[DEBUG]: Running config-update_etc_hosts using lock (<cloudinit.helpers.DummyLock object at 0x7f59e5d58dc0>)
2024-04-26 11:06:53,894 - cc_update_etc_hosts.py[DEBUG]: Configuration option 'manage_etc_hosts' is not set, not managing /etc/hosts in module update_etc_hosts
2024-04-26 11:06:53,894 - handlers.py[DEBUG]: finish: init-network/config-update_etc_hosts: SUCCESS: config-update_etc_hosts ran successfully
2024-04-26 11:06:53,894 - modules.py[DEBUG]: Running module ca-certs (<module 'cloudinit.config.cc_ca_certs' from '/usr/lib/python3.9/site-packages/cloudinit/config/cc_ca_certs.py'>) with frequency once-per-instance
2024-04-26 11:06:53,894 - handlers.py[DEBUG]: start: init-network/config-ca-certs: running config-ca-certs with frequency once-per-instance
2024-04-26 11:06:53,894 - util.py[DEBUG]: Writing to /var/lib/cloud/instances/i-0a5ccc4a0f86755be/sem/config_ca_certs - wb: [644] 25 bytes
2024-04-26 11:06:53,895 - util.py[DEBUG]: Restoring selinux mode for /var/lib/cloud/instances/i-0a5ccc4a0f86755be/sem/config_ca_certs (recursive=False)
2024-04-26 11:06:53,896 - util.py[DEBUG]: Restoring selinux mode for /var/lib/cloud/instances/i-0a5ccc4a0f86755be/sem/config_ca_certs (recursive=False)
2024-04-26 11:06:53,897 - helpers.py[DEBUG]: Running config-ca-certs using lock (<FileLock using file '/var/lib/cloud/instances/i-0a5ccc4a0f86755be/sem/config_ca_certs'>)
2024-04-26 11:06:53,897 - cc_ca_certs.py[DEBUG]: Skipping module named ca-certs, no 'ca_certs' key in configuration
2024-04-26 11:06:53,897 - handlers.py[DEBUG]: finish: init-network/config-ca-certs: SUCCESS: config-ca-certs ran successfully
2024-04-26 11:06:53,897 - modules.py[DEBUG]: Running module rsyslog (<module 'cloudinit.config.cc_rsyslog' from '/usr/lib/python3.9/site-packages/cloudinit/config/cc_rsyslog.py'>) with frequency once-per-instance
2024-04-26 11:06:53,908 - handlers.py[DEBUG]: start: init-network/config-rsyslog: running config-rsyslog with frequency once-per-instance
2024-04-26 11:06:53,909 - util.py[DEBUG]: Writing to /var/lib/cloud/instances/i-0a5ccc4a0f86755be/sem/config_rsyslog - wb: [644] 25 bytes
2024-04-26 11:06:53,909 - util.py[DEBUG]: Restoring selinux mode for /var/lib/cloud/instances/i-0a5ccc4a0f86755be/sem/config_rsyslog (recursive=False)
2024-04-26 11:06:53,911 - util.py[DEBUG]: Restoring selinux mode for /var/lib/cloud/instances/i-0a5ccc4a0f86755be/sem/config_rsyslog (recursive=False)
2024-04-26 11:06:53,912 - helpers.py[DEBUG]: Running config-rsyslog using lock (<FileLock using file '/var/lib/cloud/instances/i-0a5ccc4a0f86755be/sem/config_rsyslog'>)
2024-04-26 11:06:53,912 - cc_rsyslog.py[DEBUG]: Skipping module named rsyslog, no 'rsyslog' key in configuration
2024-04-26 11:06:53,912 - handlers.py[DEBUG]: finish: init-network/config-rsyslog: SUCCESS: config-rsyslog ran successfully
2024-04-26 11:06:53,912 - modules.py[DEBUG]: Running module selinux (<module 'cloudinit.config.cc_selinux' from '/usr/lib/python3.9/site-packages/cloudinit/config/cc_selinux.py'>) with frequency once-per-instance
2024-04-26 11:06:53,914 - handlers.py[DEBUG]: start: init-network/config-selinux: running config-selinux with frequency once-per-instance
2024-04-26 11:06:53,914 - util.py[DEBUG]: Writing to /var/lib/cloud/instances/i-0a5ccc4a0f86755be/sem/config_selinux - wb: [644] 25 bytes
2024-04-26 11:06:53,915 - util.py[DEBUG]: Restoring selinux mode for /var/lib/cloud/instances/i-0a5ccc4a0f86755be/sem/config_selinux (recursive=False)
2024-04-26 11:06:53,916 - util.py[DEBUG]: Restoring selinux mode for /var/lib/cloud/instances/i-0a5ccc4a0f86755be/sem/config_selinux (recursive=False)
2024-04-26 11:06:53,916 - helpers.py[DEBUG]: Running config-selinux using lock (<FileLock using file '/var/lib/cloud/instances/i-0a5ccc4a0f86755be/sem/config_selinux'>)
2024-04-26 11:06:53,920 - util.py[DEBUG]: backgrounded Resizing took 0.051 seconds
2024-04-26 11:06:53,942 - cc_selinux.py[DEBUG]: Current SELinux state is enabled
2024-04-26 11:06:53,943 - cc_selinux.py[DEBUG]: Current SELinux mode is permissive
2024-04-26 11:06:53,943 - cc_selinux.py[DEBUG]: Configured SELinux mode is permissive
2024-04-26 11:06:53,943 - cc_selinux.py[DEBUG]: Current SELinux policy is targeted
2024-04-26 11:06:53,943 - cc_selinux.py[DEBUG]: No SELinux configuration, skipping
2024-04-26 11:06:53,943 - handlers.py[DEBUG]: finish: init-network/config-selinux: SUCCESS: config-selinux ran successfully
2024-04-26 11:06:53,943 - modules.py[DEBUG]: Running module users-groups (<module 'cloudinit.config.cc_users_groups' from '/usr/lib/python3.9/site-packages/cloudinit/config/cc_users_groups.py'>) with frequency once-per-instance
2024-04-26 11:06:53,944 - handlers.py[DEBUG]: start: init-network/config-users-groups: running config-users-groups with frequency once-per-instance
2024-04-26 11:06:53,944 - util.py[DEBUG]: Writing to /var/lib/cloud/instances/i-0a5ccc4a0f86755be/sem/config_users_groups - wb: [644] 24 bytes
2024-04-26 11:06:53,946 - util.py[DEBUG]: Restoring selinux mode for /var/lib/cloud/instances/i-0a5ccc4a0f86755be/sem/config_users_groups (recursive=False)
2024-04-26 11:06:53,958 - util.py[DEBUG]: Restoring selinux mode for /var/lib/cloud/instances/i-0a5ccc4a0f86755be/sem/config_users_groups (recursive=False)
2024-04-26 11:06:53,959 - helpers.py[DEBUG]: Running config-users-groups using lock (<FileLock using file '/var/lib/cloud/instances/i-0a5ccc4a0f86755be/sem/config_users_groups'>)
2024-04-26 11:06:53,961 - util.py[DEBUG]: Reading from /etc/os-release (quiet=True)
2024-04-26 11:06:53,962 - util.py[DEBUG]: Read 530 bytes from /etc/os-release
2024-04-26 11:06:53,963 - util.py[DEBUG]: Reading from /etc/system-image/channel.ini (quiet=True)
2024-04-26 11:06:53,963 - util.py[DEBUG]: Read 0 bytes from /etc/system-image/channel.ini
2024-04-26 11:06:53,964 - __init__.py[DEBUG]: Adding user ec2-user
2024-04-26 11:06:53,964 - subp.py[DEBUG]: Running hidden command to protect sensitive input/output logstring: ['useradd', 'ec2-user', '--comment', 'EC2 Default User', '--groups', 'adm,systemd-journal,wheel', '--shell', '/bin/bash', '-m']
2024-04-26 11:06:54,572 - subp.py[DEBUG]: Running command ['passwd', '-l', 'ec2-user'] with allowed return codes [0] (shell=False, capture=True)
2024-04-26 11:06:54,666 - util.py[DEBUG]: Reading from /etc/sudoers (quiet=False)
2024-04-26 11:06:54,682 - util.py[DEBUG]: Read 4375 bytes from /etc/sudoers
2024-04-26 11:06:54,684 - util.py[DEBUG]: Restoring selinux mode for /etc/sudoers.d (recursive=False)
2024-04-26 11:06:54,685 - util.py[DEBUG]: Writing to /etc/sudoers.d/90-cloud-init-users - wb: [440] 128 bytes
2024-04-26 11:06:54,685 - util.py[DEBUG]: Restoring selinux mode for /etc/sudoers.d/90-cloud-init-users (recursive=False)
2024-04-26 11:06:54,686 - util.py[DEBUG]: Restoring selinux mode for /etc/sudoers.d/90-cloud-init-users (recursive=False)
2024-04-26 11:06:54,687 - handlers.py[DEBUG]: finish: init-network/config-users-groups: SUCCESS: config-users-groups ran successfully
2024-04-26 11:06:54,687 - modules.py[DEBUG]: Running module ssh (<module 'cloudinit.config.cc_ssh' from '/usr/lib/python3.9/site-packages/cloudinit/config/cc_ssh.py'>) with frequency once-per-instance
2024-04-26 11:06:54,688 - handlers.py[DEBUG]: start: init-network/config-ssh: running config-ssh with frequency once-per-instance
2024-04-26 11:06:54,688 - util.py[DEBUG]: Writing to /var/lib/cloud/instances/i-0a5ccc4a0f86755be/sem/config_ssh - wb: [644] 25 bytes
2024-04-26 11:06:54,689 - util.py[DEBUG]: Restoring selinux mode for /var/lib/cloud/instances/i-0a5ccc4a0f86755be/sem/config_ssh (recursive=False)
2024-04-26 11:06:54,690 - util.py[DEBUG]: Restoring selinux mode for /var/lib/cloud/instances/i-0a5ccc4a0f86755be/sem/config_ssh (recursive=False)
2024-04-26 11:06:54,691 - helpers.py[DEBUG]: Running config-ssh using lock (<FileLock using file '/var/lib/cloud/instances/i-0a5ccc4a0f86755be/sem/config_ssh'>)
2024-04-26 11:06:54,692 - subp.py[DEBUG]: Running command ['ssh-keygen', '-t', 'ed25519', '-N', '', '-f', '/etc/ssh/ssh_host_ed25519_key'] with allowed return codes [0] (shell=False, capture=True)
2024-04-26 11:06:54,731 - util.py[DEBUG]: Restoring selinux mode for /etc/ssh (recursive=True)
2024-04-26 11:06:54,751 - subp.py[DEBUG]: Running command ['ssh-keygen', '-t', 'ecdsa', '-N', '', '-f', '/etc/ssh/ssh_host_ecdsa_key'] with allowed return codes [0] (shell=False, capture=True)
2024-04-26 11:06:54,772 - util.py[DEBUG]: Restoring selinux mode for /etc/ssh (recursive=True)
2024-04-26 11:06:54,781 - util.py[DEBUG]: Reading from /etc/ssh/ssh_host_ed25519_key.pub (quiet=False)
2024-04-26 11:06:54,781 - util.py[DEBUG]: Read 115 bytes from /etc/ssh/ssh_host_ed25519_key.pub
2024-04-26 11:06:54,781 - util.py[DEBUG]: Reading from /etc/ssh/ssh_host_ecdsa_key.pub (quiet=False)
2024-04-26 11:06:54,781 - util.py[DEBUG]: Read 195 bytes from /etc/ssh/ssh_host_ecdsa_key.pub
2024-04-26 11:06:54,788 - util.py[DEBUG]: Reading from /etc/ssh/sshd_config (quiet=False)
2024-04-26 11:06:54,802 - util.py[DEBUG]: Read 3854 bytes from /etc/ssh/sshd_config
2024-04-26 11:06:54,803 - util.py[DEBUG]: Changing the ownership of /home/ec2-user/.ssh to 1000:1000
2024-04-26 11:06:54,804 - util.py[DEBUG]: Restoring selinux mode for /home/ec2-user/.ssh (recursive=False)
2024-04-26 11:06:54,804 - util.py[DEBUG]: Writing to /home/ec2-user/.ssh/authorized_keys - wb: [600] 0 bytes
2024-04-26 11:06:54,805 - util.py[DEBUG]: Restoring selinux mode for /home/ec2-user/.ssh/authorized_keys (recursive=False)
2024-04-26 11:06:54,805 - util.py[DEBUG]: Restoring selinux mode for /home/ec2-user/.ssh/authorized_keys (recursive=False)
2024-04-26 11:06:54,805 - util.py[DEBUG]: Changing the ownership of /home/ec2-user/.ssh/authorized_keys to 1000:1000
2024-04-26 11:06:54,805 - util.py[DEBUG]: Reading from /home/ec2-user/.ssh/authorized_keys (quiet=False)
2024-04-26 11:06:54,805 - util.py[DEBUG]: Read 0 bytes from /home/ec2-user/.ssh/authorized_keys
2024-04-26 11:06:54,806 - util.py[DEBUG]: Writing to /home/ec2-user/.ssh/authorized_keys - wb: [600] 399 bytes
2024-04-26 11:06:54,806 - util.py[DEBUG]: Restoring selinux mode for /home/ec2-user/.ssh/authorized_keys (recursive=False)
2024-04-26 11:06:54,806 - util.py[DEBUG]: Restoring selinux mode for /home/ec2-user/.ssh/authorized_keys (recursive=False)
2024-04-26 11:06:54,806 - util.py[DEBUG]: Restoring selinux mode for /home/ec2-user/.ssh (recursive=True)
2024-04-26 11:06:54,818 - util.py[DEBUG]: Reading from /etc/ssh/sshd_config (quiet=False)
2024-04-26 11:06:54,818 - util.py[DEBUG]: Read 3854 bytes from /etc/ssh/sshd_config
2024-04-26 11:06:54,819 - util.py[DEBUG]: Restoring selinux mode for /root/.ssh (recursive=True)
2024-04-26 11:06:54,821 - util.py[DEBUG]: Writing to /root/.ssh/authorized_keys - wb: [600] 0 bytes
2024-04-26 11:06:54,822 - util.py[DEBUG]: Restoring selinux mode for /root/.ssh/authorized_keys (recursive=False)
2024-04-26 11:06:54,822 - util.py[DEBUG]: Restoring selinux mode for /root/.ssh/authorized_keys (recursive=False)
2024-04-26 11:06:54,822 - util.py[DEBUG]: Changing the ownership of /root/.ssh/authorized_keys to 0:0
2024-04-26 11:06:54,822 - util.py[DEBUG]: Reading from /root/.ssh/authorized_keys (quiet=False)
2024-04-26 11:06:54,822 - util.py[DEBUG]: Read 0 bytes from /root/.ssh/authorized_keys
2024-04-26 11:06:54,822 - util.py[DEBUG]: Writing to /root/.ssh/authorized_keys - wb: [600] 565 bytes
2024-04-26 11:06:54,823 - util.py[DEBUG]: Restoring selinux mode for /root/.ssh/authorized_keys (recursive=False)
2024-04-26 11:06:54,823 - util.py[DEBUG]: Restoring selinux mode for /root/.ssh/authorized_keys (recursive=False)
2024-04-26 11:06:54,823 - util.py[DEBUG]: Restoring selinux mode for /root/.ssh (recursive=True)
2024-04-26 11:06:54,825 - handlers.py[DEBUG]: finish: init-network/config-ssh: SUCCESS: config-ssh ran successfully
2024-04-26 11:06:54,825 - main.py[DEBUG]: Ran 17 modules with 0 failures
2024-04-26 11:06:54,826 - atomic_helper.py[DEBUG]: Atomically writing to file /var/lib/cloud/data/status.json (via temporary file /var/lib/cloud/data/tmp6hpp34m8) - w: [644] 486 bytes/chars
2024-04-26 11:06:54,826 - util.py[DEBUG]: Reading from /proc/uptime (quiet=False)
2024-04-26 11:06:54,826 - util.py[DEBUG]: Read 11 bytes from /proc/uptime
2024-04-26 11:06:54,826 - util.py[DEBUG]: cloud-init mode 'init' took 2.909 seconds (2.91)
2024-04-26 11:06:54,826 - handlers.py[DEBUG]: finish: init-network: SUCCESS: searching for network datasources
2024-04-26 11:06:55,856 - util.py[DEBUG]: Cloud-init v. 22.2.2 running 'modules:config' at Fri, 26 Apr 2024 11:06:55 +0000. Up 12.32 seconds.
2024-04-26 11:06:55,869 - util.py[DEBUG]: Reading from /usr/lib/python3.9/site-packages/cloudinit/config/schemas/schema-cloud-config-v1.json (quiet=False)
2024-04-26 11:06:55,869 - util.py[DEBUG]: Read 102081 bytes from /usr/lib/python3.9/site-packages/cloudinit/config/schemas/schema-cloud-config-v1.json
2024-04-26 11:06:55,874 - util.py[DEBUG]: Reading from /usr/lib/python3.9/site-packages/cloudinit/config/schemas/schema-cloud-config-v1.json (quiet=False)
2024-04-26 11:06:55,874 - util.py[DEBUG]: Read 102081 bytes from /usr/lib/python3.9/site-packages/cloudinit/config/schemas/schema-cloud-config-v1.json
2024-04-26 11:06:55,878 - util.py[DEBUG]: Reading from /usr/lib/python3.9/site-packages/cloudinit/config/schemas/schema-cloud-config-v1.json (quiet=False)
2024-04-26 11:06:55,879 - util.py[DEBUG]: Read 102081 bytes from /usr/lib/python3.9/site-packages/cloudinit/config/schemas/schema-cloud-config-v1.json
2024-04-26 11:06:55,884 - util.py[DEBUG]: Reading from /usr/lib/python3.9/site-packages/cloudinit/config/schemas/schema-cloud-config-v1.json (quiet=False)
2024-04-26 11:06:55,884 - util.py[DEBUG]: Read 102081 bytes from /usr/lib/python3.9/site-packages/cloudinit/config/schemas/schema-cloud-config-v1.json
2024-04-26 11:06:55,887 - util.py[DEBUG]: Reading from /usr/lib/python3.9/site-packages/cloudinit/config/schemas/schema-cloud-config-v1.json (quiet=False)
2024-04-26 11:06:55,887 - util.py[DEBUG]: Read 102081 bytes from /usr/lib/python3.9/site-packages/cloudinit/config/schemas/schema-cloud-config-v1.json
2024-04-26 11:06:55,891 - util.py[DEBUG]: Reading from /usr/lib/python3.9/site-packages/cloudinit/config/schemas/schema-cloud-config-v1.json (quiet=False)
2024-04-26 11:06:55,892 - util.py[DEBUG]: Read 102081 bytes from /usr/lib/python3.9/site-packages/cloudinit/config/schemas/schema-cloud-config-v1.json
2024-04-26 11:06:55,895 - util.py[DEBUG]: Reading from /usr/lib/python3.9/site-packages/cloudinit/config/schemas/schema-cloud-config-v1.json (quiet=False)
2024-04-26 11:06:55,895 - util.py[DEBUG]: Read 102081 bytes from /usr/lib/python3.9/site-packages/cloudinit/config/schemas/schema-cloud-config-v1.json
2024-04-26 11:06:55,901 - util.py[DEBUG]: Reading from /usr/lib/python3.9/site-packages/cloudinit/config/schemas/schema-cloud-config-v1.json (quiet=False)
2024-04-26 11:06:55,901 - util.py[DEBUG]: Read 102081 bytes from /usr/lib/python3.9/site-packages/cloudinit/config/schemas/schema-cloud-config-v1.json
2024-04-26 11:06:55,908 - util.py[DEBUG]: Reading from /usr/lib/python3.9/site-packages/cloudinit/config/schemas/schema-cloud-config-v1.json (quiet=False)
2024-04-26 11:06:55,908 - util.py[DEBUG]: Read 102081 bytes from /usr/lib/python3.9/site-packages/cloudinit/config/schemas/schema-cloud-config-v1.json
2024-04-26 11:06:55,911 - util.py[DEBUG]: Reading from /usr/lib/python3.9/site-packages/cloudinit/config/schemas/schema-cloud-config-v1.json (quiet=False)
2024-04-26 11:06:55,911 - util.py[DEBUG]: Read 102081 bytes from /usr/lib/python3.9/site-packages/cloudinit/config/schemas/schema-cloud-config-v1.json
2024-04-26 11:06:55,914 - stages.py[DEBUG]: Using distro class <class 'cloudinit.distros.amazon.Distro'>
2024-04-26 11:06:55,914 - modules.py[INFO]: Skipping modules 'ssh-import-id' because they are not verified on distro 'amazon'.  To run anyway, add them to 'unverified_modules' in config.
2024-04-26 11:06:55,915 - modules.py[DEBUG]: Running module keyboard (<module 'cloudinit.config.cc_keyboard' from '/usr/lib/python3.9/site-packages/cloudinit/config/cc_keyboard.py'>) with frequency once-per-instance
2024-04-26 11:06:55,915 - handlers.py[DEBUG]: start: modules-config/config-keyboard: running config-keyboard with frequency once-per-instance
2024-04-26 11:06:55,915 - util.py[DEBUG]: Writing to /var/lib/cloud/instances/i-0a5ccc4a0f86755be/sem/config_keyboard - wb: [644] 25 bytes
2024-04-26 11:06:55,918 - util.py[DEBUG]: Restoring selinux mode for /var/lib/cloud/instances/i-0a5ccc4a0f86755be/sem/config_keyboard (recursive=False)
2024-04-26 11:06:55,922 - util.py[DEBUG]: Restoring selinux mode for /var/lib/cloud/instances/i-0a5ccc4a0f86755be/sem/config_keyboard (recursive=False)
2024-04-26 11:06:55,922 - helpers.py[DEBUG]: Running config-keyboard using lock (<FileLock using file '/var/lib/cloud/instances/i-0a5ccc4a0f86755be/sem/config_keyboard'>)
2024-04-26 11:06:55,923 - cc_keyboard.py[DEBUG]: Skipping module named keyboard, no 'keyboard' section found
2024-04-26 11:06:55,923 - handlers.py[DEBUG]: finish: modules-config/config-keyboard: SUCCESS: config-keyboard ran successfully
2024-04-26 11:06:55,923 - modules.py[DEBUG]: Running module locale (<module 'cloudinit.config.cc_locale' from '/usr/lib/python3.9/site-packages/cloudinit/config/cc_locale.py'>) with frequency once-per-instance
2024-04-26 11:06:55,923 - handlers.py[DEBUG]: start: modules-config/config-locale: running config-locale with frequency once-per-instance
2024-04-26 11:06:55,923 - util.py[DEBUG]: Writing to /var/lib/cloud/instances/i-0a5ccc4a0f86755be/sem/config_locale - wb: [644] 25 bytes
2024-04-26 11:06:55,924 - util.py[DEBUG]: Restoring selinux mode for /var/lib/cloud/instances/i-0a5ccc4a0f86755be/sem/config_locale (recursive=False)
2024-04-26 11:06:55,925 - util.py[DEBUG]: Restoring selinux mode for /var/lib/cloud/instances/i-0a5ccc4a0f86755be/sem/config_locale (recursive=False)
2024-04-26 11:06:55,926 - helpers.py[DEBUG]: Running config-locale using lock (<FileLock using file '/var/lib/cloud/instances/i-0a5ccc4a0f86755be/sem/config_locale'>)
2024-04-26 11:06:55,926 - util.py[DEBUG]: Reading from /etc/locale.conf (quiet=False)
2024-04-26 11:06:55,926 - util.py[DEBUG]: Read 81 bytes from /etc/locale.conf
2024-04-26 11:06:55,927 - cc_locale.py[DEBUG]: Setting locale to C.UTF-8
2024-04-26 11:06:55,927 - util.py[DEBUG]: Reading from /etc/locale.conf (quiet=False)
2024-04-26 11:06:55,927 - util.py[DEBUG]: Read 81 bytes from /etc/locale.conf
2024-04-26 11:06:55,938 - util.py[DEBUG]: Writing to /etc/locale.conf - wb: [644] 79 bytes
2024-04-26 11:06:55,942 - util.py[DEBUG]: Restoring selinux mode for /etc/locale.conf (recursive=False)
2024-04-26 11:06:55,946 - util.py[DEBUG]: Restoring selinux mode for /etc/locale.conf (recursive=False)
2024-04-26 11:06:55,947 - handlers.py[DEBUG]: finish: modules-config/config-locale: SUCCESS: config-locale ran successfully
2024-04-26 11:06:55,947 - modules.py[DEBUG]: Running module set-passwords (<module 'cloudinit.config.cc_set_passwords' from '/usr/lib/python3.9/site-packages/cloudinit/config/cc_set_passwords.py'>) with frequency once-per-instance
2024-04-26 11:06:55,947 - handlers.py[DEBUG]: start: modules-config/config-set-passwords: running config-set-passwords with frequency once-per-instance
2024-04-26 11:06:55,947 - util.py[DEBUG]: Writing to /var/lib/cloud/instances/i-0a5ccc4a0f86755be/sem/config_set_passwords - wb: [644] 25 bytes
2024-04-26 11:06:55,948 - util.py[DEBUG]: Restoring selinux mode for /var/lib/cloud/instances/i-0a5ccc4a0f86755be/sem/config_set_passwords (recursive=False)
2024-04-26 11:06:55,949 - util.py[DEBUG]: Restoring selinux mode for /var/lib/cloud/instances/i-0a5ccc4a0f86755be/sem/config_set_passwords (recursive=False)
2024-04-26 11:06:55,950 - helpers.py[DEBUG]: Running config-set-passwords using lock (<FileLock using file '/var/lib/cloud/instances/i-0a5ccc4a0f86755be/sem/config_set_passwords'>)
2024-04-26 11:06:55,950 - subp.py[DEBUG]: Running command ['systemctl', 'status', 'sshd'] with allowed return codes [0] (shell=False, capture=True)
2024-04-26 11:06:56,006 - util.py[DEBUG]: Reading from /etc/ssh/sshd_config (quiet=False)
2024-04-26 11:06:56,006 - util.py[DEBUG]: Read 3854 bytes from /etc/ssh/sshd_config
2024-04-26 11:06:56,006 - ssh_util.py[DEBUG]: line 65: option PasswordAuthentication already set to no
2024-04-26 11:06:56,007 - cc_set_passwords.py[DEBUG]: No need to restart SSH service, PasswordAuthentication not updated.
2024-04-26 11:06:56,007 - handlers.py[DEBUG]: finish: modules-config/config-set-passwords: SUCCESS: config-set-passwords ran successfully
2024-04-26 11:06:56,007 - modules.py[DEBUG]: Running module yum-variables (<module 'cloudinit.config.cc_yum_variables' from '/usr/lib/python3.9/site-packages/cloudinit/config/cc_yum_variables.py'>) with frequency once-per-instance
2024-04-26 11:06:56,011 - handlers.py[DEBUG]: start: modules-config/config-yum-variables: running config-yum-variables with frequency once-per-instance
2024-04-26 11:06:56,011 - util.py[DEBUG]: Writing to /var/lib/cloud/instances/i-0a5ccc4a0f86755be/sem/config_yum_variables - wb: [644] 24 bytes
2024-04-26 11:06:56,012 - util.py[DEBUG]: Restoring selinux mode for /var/lib/cloud/instances/i-0a5ccc4a0f86755be/sem/config_yum_variables (recursive=False)
2024-04-26 11:06:56,014 - util.py[DEBUG]: Restoring selinux mode for /var/lib/cloud/instances/i-0a5ccc4a0f86755be/sem/config_yum_variables (recursive=False)
2024-04-26 11:06:56,015 - helpers.py[DEBUG]: Running config-yum-variables using lock (<FileLock using file '/var/lib/cloud/instances/i-0a5ccc4a0f86755be/sem/config_yum_variables'>)
2024-04-26 11:06:56,015 - cc_yum_variables.py[INFO]: handling yum-variables
2024-04-26 11:06:56,015 - cc_yum_variables.py[INFO]: cfg = {'power_state': {'delay': 'now', 'mode': 'reboot', 'message': 'Rebooting machine to apply SELinux kernel commandline setting', 'condition': 'test -f /run/cloud-init-selinux-reboot'}, 'write_metadata': [{'path': '/etc/dnf/vars/awsregion', 'data': [{'identity': 'region'}, 'default']}, {'path': '/etc/dnf/vars/awsdomain', 'data': [{'metadata': 'services/domain'}, 'amazonaws.com']}], '_log': ['[loggers]\nkeys=root,cloudinit\n\n[handlers]\nkeys=consoleHandler,cloudLogHandler\n\n[formatters]\nkeys=simpleFormatter,arg0Formatter\n\n[logger_root]\nlevel=DEBUG\nhandlers=consoleHandler,cloudLogHandler\n\n[logger_cloudinit]\nlevel=DEBUG\nqualname=cloudinit\nhandlers=\npropagate=1\n\n[handler_consoleHandler]\nclass=StreamHandler\nlevel=WARNING\nformatter=arg0Formatter\nargs=(sys.stderr,)\n\n[formatter_arg0Formatter]\nformat=%(asctime)s - %(filename)s[%(levelname)s]: %(message)s\n\n[formatter_simpleFormatter]\nformat=[CLOUDINIT] %(filename)s[%(levelname)s]: %(message)s\n', "[handler_cloudLogHandler]\nclass=FileHandler\nlevel=DEBUG\nformatter=arg0Formatter\nargs=('/var/log/cloud-init.log', 'a', 'UTF-8')\n", '[handler_cloudLogHandler]\nclass=handlers.SysLogHandler\nlevel=DEBUG\nformatter=simpleFormatter\nargs=("/dev/log", handlers.SysLogHandler.LOG_USER)\n'], 'log_cfgs': [['[loggers]\nkeys=root,cloudinit\n\n[handlers]\nkeys=consoleHandler,cloudLogHandler\n\n[formatters]\nkeys=simpleFormatter,arg0Formatter\n\n[logger_root]\nlevel=DEBUG\nhandlers=consoleHandler,cloudLogHandler\n\n[logger_cloudinit]\nlevel=DEBUG\nqualname=cloudinit\nhandlers=\npropagate=1\n\n[handler_consoleHandler]\nclass=StreamHandler\nlevel=WARNING\nformatter=arg0Formatter\nargs=(sys.stderr,)\n\n[formatter_arg0Formatter]\nformat=%(asctime)s - %(filename)s[%(levelname)s]: %(message)s\n\n[formatter_simpleFormatter]\nformat=[CLOUDINIT] %(filename)s[%(levelname)s]: %(message)s\n', "[handler_cloudLogHandler]\nclass=FileHandler\nlevel=DEBUG\nformatter=arg0Formatter\nargs=('/var/log/cloud-init.log', 'a', 'UTF-8')\n"]], 'output': {'all': '| tee -a /var/log/cloud-init-output.log'}, 'network': {'config': 'disabled'}, 'datasource_list': ['Ec2', 'None'], 'datasource': {'Ec2': {'metadata_urls': ['http://169.254.169.254:80', 'http://[fd00:ec2::254]:80'], 'apply_full_imds_network_config': False}}, 'ssh_genkeytypes': ['ed25519', 'ecdsa'], 'users': ['default'], 'disable_root': True, 'mount_default_fields': [None, None, 'auto', 'defaults,nofail', '0', '2'], 'resize_rootfs': 'noblock', 'resize_rootfs_tmp': '/dev', 'ssh_pwauth': False, 'preserve_hostname': False, 'cloud_init_modules': ['migrator', 'seed_random', 'bootcmd', 'write-files', 'write-metadata', 'growpart', 'resizefs', 'disk_setup', 'mounts', 'set_hostname', 'update_hostname', 'update_etc_hosts', 'ca-certs', 'rsyslog', 'selinux', 'users-groups', 'ssh'], 'cloud_config_modules': ['ssh-import-id', 'keyboard', 'locale', 'set-passwords', 'yum-variables', 'yum-add-repo', 'ntp', 'timezone', 'disable-ec2-metadata', 'runcmd'], 'cloud_final_modules': ['package-update-upgrade-install', 'write-files-deferred', 'puppet', 'chef', 'mcollective', 'salt-minion', 'reset_rmc', 'refresh_rmc_and_interface', 'rightscale_userdata', 'scripts-vendor', 'scripts-per-once', 'scripts-per-boot', 'scripts-per-instance', 'scripts-user', 'ssh-authkey-fingerprints', 'keys-to-console', 'install-hotplug', 'phone-home', 'final-message', 'power-state-change'], 'def_log_file': '/var/log/cloud-init.log', 'syslog_fix_perms': ['syslog:adm', 'root:adm', 'root:wheel', 'root:root'], 'vendor_data': {'enabled': True, 'prefix': []}, 'vendor_data2': {'enabled': True, 'prefix': []}}
2024-04-26 11:06:56,015 - cc_yum_variables.py[INFO]: No yum vars to delete
2024-04-26 11:06:56,015 - cc_yum_variables.py[INFO]: No yum vars to set
2024-04-26 11:06:56,015 - handlers.py[DEBUG]: finish: modules-config/config-yum-variables: SUCCESS: config-yum-variables ran successfully
2024-04-26 11:06:56,015 - modules.py[DEBUG]: Running module yum-add-repo (<module 'cloudinit.config.cc_yum_add_repo' from '/usr/lib/python3.9/site-packages/cloudinit/config/cc_yum_add_repo.py'>) with frequency once-per-instance
2024-04-26 11:06:56,016 - handlers.py[DEBUG]: start: modules-config/config-yum-add-repo: running config-yum-add-repo with frequency once-per-instance
2024-04-26 11:06:56,016 - util.py[DEBUG]: Writing to /var/lib/cloud/instances/i-0a5ccc4a0f86755be/sem/config_yum_add_repo - wb: [644] 25 bytes
2024-04-26 11:06:56,017 - util.py[DEBUG]: Restoring selinux mode for /var/lib/cloud/instances/i-0a5ccc4a0f86755be/sem/config_yum_add_repo (recursive=False)
2024-04-26 11:06:56,028 - util.py[DEBUG]: Restoring selinux mode for /var/lib/cloud/instances/i-0a5ccc4a0f86755be/sem/config_yum_add_repo (recursive=False)
2024-04-26 11:06:56,029 - helpers.py[DEBUG]: Running config-yum-add-repo using lock (<FileLock using file '/var/lib/cloud/instances/i-0a5ccc4a0f86755be/sem/config_yum_add_repo'>)
2024-04-26 11:06:56,029 - cc_yum_add_repo.py[DEBUG]: Skipping module named yum-add-repo, no 'yum_repos' configuration found
2024-04-26 11:06:56,029 - handlers.py[DEBUG]: finish: modules-config/config-yum-add-repo: SUCCESS: config-yum-add-repo ran successfully
2024-04-26 11:06:56,029 - modules.py[DEBUG]: Running module ntp (<module 'cloudinit.config.cc_ntp' from '/usr/lib/python3.9/site-packages/cloudinit/config/cc_ntp.py'>) with frequency once-per-instance
2024-04-26 11:06:56,030 - handlers.py[DEBUG]: start: modules-config/config-ntp: running config-ntp with frequency once-per-instance
2024-04-26 11:06:56,030 - util.py[DEBUG]: Writing to /var/lib/cloud/instances/i-0a5ccc4a0f86755be/sem/config_ntp - wb: [644] 25 bytes
2024-04-26 11:06:56,030 - util.py[DEBUG]: Restoring selinux mode for /var/lib/cloud/instances/i-0a5ccc4a0f86755be/sem/config_ntp (recursive=False)
2024-04-26 11:06:56,033 - util.py[DEBUG]: Restoring selinux mode for /var/lib/cloud/instances/i-0a5ccc4a0f86755be/sem/config_ntp (recursive=False)
2024-04-26 11:06:56,033 - helpers.py[DEBUG]: Running config-ntp using lock (<FileLock using file '/var/lib/cloud/instances/i-0a5ccc4a0f86755be/sem/config_ntp'>)
2024-04-26 11:06:56,033 - cc_ntp.py[DEBUG]: Skipping module named ntp, not present or disabled by cfg
2024-04-26 11:06:56,033 - handlers.py[DEBUG]: finish: modules-config/config-ntp: SUCCESS: config-ntp ran successfully
2024-04-26 11:06:56,033 - modules.py[DEBUG]: Running module timezone (<module 'cloudinit.config.cc_timezone' from '/usr/lib/python3.9/site-packages/cloudinit/config/cc_timezone.py'>) with frequency once-per-instance
2024-04-26 11:06:56,034 - handlers.py[DEBUG]: start: modules-config/config-timezone: running config-timezone with frequency once-per-instance
2024-04-26 11:06:56,034 - util.py[DEBUG]: Writing to /var/lib/cloud/instances/i-0a5ccc4a0f86755be/sem/config_timezone - wb: [644] 25 bytes
2024-04-26 11:06:56,035 - util.py[DEBUG]: Restoring selinux mode for /var/lib/cloud/instances/i-0a5ccc4a0f86755be/sem/config_timezone (recursive=False)
2024-04-26 11:06:56,036 - util.py[DEBUG]: Restoring selinux mode for /var/lib/cloud/instances/i-0a5ccc4a0f86755be/sem/config_timezone (recursive=False)
2024-04-26 11:06:56,037 - helpers.py[DEBUG]: Running config-timezone using lock (<FileLock using file '/var/lib/cloud/instances/i-0a5ccc4a0f86755be/sem/config_timezone'>)
2024-04-26 11:06:56,037 - cc_timezone.py[DEBUG]: Skipping module named timezone, no 'timezone' specified
2024-04-26 11:06:56,037 - handlers.py[DEBUG]: finish: modules-config/config-timezone: SUCCESS: config-timezone ran successfully
2024-04-26 11:06:56,037 - modules.py[DEBUG]: Running module disable-ec2-metadata (<module 'cloudinit.config.cc_disable_ec2_metadata' from '/usr/lib/python3.9/site-packages/cloudinit/config/cc_disable_ec2_metadata.py'>) with frequency always
2024-04-26 11:06:56,037 - handlers.py[DEBUG]: start: modules-config/config-disable-ec2-metadata: running config-disable-ec2-metadata with frequency always
2024-04-26 11:06:56,037 - helpers.py[DEBUG]: Running config-disable-ec2-metadata using lock (<cloudinit.helpers.DummyLock object at 0x7f8252a4e970>)
2024-04-26 11:06:56,037 - cc_disable_ec2_metadata.py[DEBUG]: Skipping module named disable-ec2-metadata, disabling the ec2 route not enabled
2024-04-26 11:06:56,037 - handlers.py[DEBUG]: finish: modules-config/config-disable-ec2-metadata: SUCCESS: config-disable-ec2-metadata ran successfully
2024-04-26 11:06:56,037 - modules.py[DEBUG]: Running module runcmd (<module 'cloudinit.config.cc_runcmd' from '/usr/lib/python3.9/site-packages/cloudinit/config/cc_runcmd.py'>) with frequency once-per-instance
2024-04-26 11:06:56,038 - handlers.py[DEBUG]: start: modules-config/config-runcmd: running config-runcmd with frequency once-per-instance
2024-04-26 11:06:56,038 - util.py[DEBUG]: Writing to /var/lib/cloud/instances/i-0a5ccc4a0f86755be/sem/config_runcmd - wb: [644] 25 bytes
2024-04-26 11:06:56,039 - util.py[DEBUG]: Restoring selinux mode for /var/lib/cloud/instances/i-0a5ccc4a0f86755be/sem/config_runcmd (recursive=False)
2024-04-26 11:06:56,040 - util.py[DEBUG]: Restoring selinux mode for /var/lib/cloud/instances/i-0a5ccc4a0f86755be/sem/config_runcmd (recursive=False)
2024-04-26 11:06:56,041 - helpers.py[DEBUG]: Running config-runcmd using lock (<FileLock using file '/var/lib/cloud/instances/i-0a5ccc4a0f86755be/sem/config_runcmd'>)
2024-04-26 11:06:56,048 - cc_runcmd.py[DEBUG]: Skipping module named runcmd, no 'runcmd' key in configuration
2024-04-26 11:06:56,048 - handlers.py[DEBUG]: finish: modules-config/config-runcmd: SUCCESS: config-runcmd ran successfully
2024-04-26 11:06:56,048 - main.py[DEBUG]: Ran 9 modules with 0 failures
2024-04-26 11:06:56,049 - atomic_helper.py[DEBUG]: Atomically writing to file /var/lib/cloud/data/status.json (via temporary file /var/lib/cloud/data/tmpv6zg_br5) - w: [644] 514 bytes/chars
2024-04-26 11:06:56,049 - util.py[DEBUG]: Reading from /proc/uptime (quiet=False)
2024-04-26 11:06:56,049 - util.py[DEBUG]: Read 11 bytes from /proc/uptime
2024-04-26 11:06:56,049 - util.py[DEBUG]: cloud-init mode 'modules' took 0.414 seconds (0.42)
2024-04-26 11:06:56,049 - handlers.py[DEBUG]: finish: modules-config: SUCCESS: running modules for config
2024-04-26 11:06:56,978 - util.py[DEBUG]: Cloud-init v. 22.2.2 running 'modules:final' at Fri, 26 Apr 2024 11:06:56 +0000. Up 13.49 seconds.
2024-04-26 11:06:56,991 - util.py[DEBUG]: Reading from /usr/lib/python3.9/site-packages/cloudinit/config/schemas/schema-cloud-config-v1.json (quiet=False)
2024-04-26 11:06:56,992 - util.py[DEBUG]: Read 102081 bytes from /usr/lib/python3.9/site-packages/cloudinit/config/schemas/schema-cloud-config-v1.json
2024-04-26 11:06:56,996 - util.py[DEBUG]: Reading from /usr/lib/python3.9/site-packages/cloudinit/config/schemas/schema-cloud-config-v1.json (quiet=False)
2024-04-26 11:06:56,997 - util.py[DEBUG]: Read 102081 bytes from /usr/lib/python3.9/site-packages/cloudinit/config/schemas/schema-cloud-config-v1.json
2024-04-26 11:06:57,004 - util.py[DEBUG]: Reading from /usr/lib/python3.9/site-packages/cloudinit/config/schemas/schema-cloud-config-v1.json (quiet=False)
2024-04-26 11:06:57,004 - util.py[DEBUG]: Read 102081 bytes from /usr/lib/python3.9/site-packages/cloudinit/config/schemas/schema-cloud-config-v1.json
2024-04-26 11:06:57,008 - util.py[DEBUG]: Reading from /usr/lib/python3.9/site-packages/cloudinit/config/schemas/schema-cloud-config-v1.json (quiet=False)
2024-04-26 11:06:57,008 - util.py[DEBUG]: Read 102081 bytes from /usr/lib/python3.9/site-packages/cloudinit/config/schemas/schema-cloud-config-v1.json
2024-04-26 11:06:57,018 - util.py[DEBUG]: Reading from /usr/lib/python3.9/site-packages/cloudinit/config/schemas/schema-cloud-config-v1.json (quiet=False)
2024-04-26 11:06:57,018 - util.py[DEBUG]: Read 102081 bytes from /usr/lib/python3.9/site-packages/cloudinit/config/schemas/schema-cloud-config-v1.json
2024-04-26 11:06:57,028 - util.py[DEBUG]: Reading from /usr/lib/python3.9/site-packages/cloudinit/config/schemas/schema-cloud-config-v1.json (quiet=False)
2024-04-26 11:06:57,028 - util.py[DEBUG]: Read 102081 bytes from /usr/lib/python3.9/site-packages/cloudinit/config/schemas/schema-cloud-config-v1.json
2024-04-26 11:06:57,034 - util.py[DEBUG]: Reading from /usr/lib/python3.9/site-packages/cloudinit/config/schemas/schema-cloud-config-v1.json (quiet=False)
2024-04-26 11:06:57,034 - util.py[DEBUG]: Read 102081 bytes from /usr/lib/python3.9/site-packages/cloudinit/config/schemas/schema-cloud-config-v1.json
2024-04-26 11:06:57,038 - util.py[DEBUG]: Reading from /usr/lib/python3.9/site-packages/cloudinit/config/schemas/schema-cloud-config-v1.json (quiet=False)
2024-04-26 11:06:57,038 - util.py[DEBUG]: Read 102081 bytes from /usr/lib/python3.9/site-packages/cloudinit/config/schemas/schema-cloud-config-v1.json
2024-04-26 11:06:57,049 - util.py[DEBUG]: Reading from /usr/lib/python3.9/site-packages/cloudinit/config/schemas/schema-cloud-config-v1.json (quiet=False)
2024-04-26 11:06:57,049 - util.py[DEBUG]: Read 102081 bytes from /usr/lib/python3.9/site-packages/cloudinit/config/schemas/schema-cloud-config-v1.json
2024-04-26 11:06:57,058 - util.py[DEBUG]: Reading from /usr/lib/python3.9/site-packages/cloudinit/config/schemas/schema-cloud-config-v1.json (quiet=False)
2024-04-26 11:06:57,058 - util.py[DEBUG]: Read 102081 bytes from /usr/lib/python3.9/site-packages/cloudinit/config/schemas/schema-cloud-config-v1.json
2024-04-26 11:06:57,061 - util.py[DEBUG]: Reading from /usr/lib/python3.9/site-packages/cloudinit/config/schemas/schema-cloud-config-v1.json (quiet=False)
2024-04-26 11:06:57,061 - util.py[DEBUG]: Read 102081 bytes from /usr/lib/python3.9/site-packages/cloudinit/config/schemas/schema-cloud-config-v1.json
2024-04-26 11:06:57,064 - util.py[DEBUG]: Reading from /usr/lib/python3.9/site-packages/cloudinit/config/schemas/schema-cloud-config-v1.json (quiet=False)
2024-04-26 11:06:57,065 - util.py[DEBUG]: Read 102081 bytes from /usr/lib/python3.9/site-packages/cloudinit/config/schemas/schema-cloud-config-v1.json
2024-04-26 11:06:57,069 - util.py[DEBUG]: Reading from /usr/lib/python3.9/site-packages/cloudinit/config/schemas/schema-cloud-config-v1.json (quiet=False)
2024-04-26 11:06:57,069 - util.py[DEBUG]: Read 102081 bytes from /usr/lib/python3.9/site-packages/cloudinit/config/schemas/schema-cloud-config-v1.json
2024-04-26 11:06:57,078 - util.py[DEBUG]: Reading from /usr/lib/python3.9/site-packages/cloudinit/config/schemas/schema-cloud-config-v1.json (quiet=False)
2024-04-26 11:06:57,078 - util.py[DEBUG]: Read 102081 bytes from /usr/lib/python3.9/site-packages/cloudinit/config/schemas/schema-cloud-config-v1.json
2024-04-26 11:06:57,081 - util.py[DEBUG]: Reading from /usr/lib/python3.9/site-packages/cloudinit/config/schemas/schema-cloud-config-v1.json (quiet=False)
2024-04-26 11:06:57,081 - util.py[DEBUG]: Read 102081 bytes from /usr/lib/python3.9/site-packages/cloudinit/config/schemas/schema-cloud-config-v1.json
2024-04-26 11:06:57,084 - util.py[DEBUG]: Reading from /usr/lib/python3.9/site-packages/cloudinit/config/schemas/schema-cloud-config-v1.json (quiet=False)
2024-04-26 11:06:57,084 - util.py[DEBUG]: Read 102081 bytes from /usr/lib/python3.9/site-packages/cloudinit/config/schemas/schema-cloud-config-v1.json
2024-04-26 11:06:57,098 - util.py[DEBUG]: Reading from /usr/lib/python3.9/site-packages/cloudinit/config/schemas/schema-cloud-config-v1.json (quiet=False)
2024-04-26 11:06:57,098 - util.py[DEBUG]: Read 102081 bytes from /usr/lib/python3.9/site-packages/cloudinit/config/schemas/schema-cloud-config-v1.json
2024-04-26 11:06:57,102 - util.py[DEBUG]: Reading from /usr/lib/python3.9/site-packages/cloudinit/config/schemas/schema-cloud-config-v1.json (quiet=False)
2024-04-26 11:06:57,102 - util.py[DEBUG]: Read 102081 bytes from /usr/lib/python3.9/site-packages/cloudinit/config/schemas/schema-cloud-config-v1.json
2024-04-26 11:06:57,105 - stages.py[DEBUG]: Using distro class <class 'cloudinit.distros.amazon.Distro'>
2024-04-26 11:06:57,106 - modules.py[DEBUG]: Running module package-update-upgrade-install (<module 'cloudinit.config.cc_package_update_upgrade_install' from '/usr/lib/python3.9/site-packages/cloudinit/config/cc_package_update_upgrade_install.py'>) with frequency once-per-instance
2024-04-26 11:06:57,106 - handlers.py[DEBUG]: start: modules-final/config-package-update-upgrade-install: running config-package-update-upgrade-install with frequency once-per-instance
2024-04-26 11:06:57,107 - util.py[DEBUG]: Writing to /var/lib/cloud/instances/i-0a5ccc4a0f86755be/sem/config_package_update_upgrade_install - wb: [644] 23 bytes
2024-04-26 11:06:57,110 - util.py[DEBUG]: Restoring selinux mode for /var/lib/cloud/instances/i-0a5ccc4a0f86755be/sem/config_package_update_upgrade_install (recursive=False)
2024-04-26 11:06:57,113 - util.py[DEBUG]: Restoring selinux mode for /var/lib/cloud/instances/i-0a5ccc4a0f86755be/sem/config_package_update_upgrade_install (recursive=False)
2024-04-26 11:06:57,114 - helpers.py[DEBUG]: Running config-package-update-upgrade-install using lock (<FileLock using file '/var/lib/cloud/instances/i-0a5ccc4a0f86755be/sem/config_package_update_upgrade_install'>)
2024-04-26 11:06:57,114 - handlers.py[DEBUG]: finish: modules-final/config-package-update-upgrade-install: SUCCESS: config-package-update-upgrade-install ran successfully
2024-04-26 11:06:57,114 - modules.py[DEBUG]: Running module write-files-deferred (<module 'cloudinit.config.cc_write_files_deferred' from '/usr/lib/python3.9/site-packages/cloudinit/config/cc_write_files_deferred.py'>) with frequency once-per-instance
2024-04-26 11:06:57,115 - handlers.py[DEBUG]: start: modules-final/config-write-files-deferred: running config-write-files-deferred with frequency once-per-instance
2024-04-26 11:06:57,115 - util.py[DEBUG]: Writing to /var/lib/cloud/instances/i-0a5ccc4a0f86755be/sem/config_write_files_deferred - wb: [644] 24 bytes
2024-04-26 11:06:57,116 - util.py[DEBUG]: Restoring selinux mode for /var/lib/cloud/instances/i-0a5ccc4a0f86755be/sem/config_write_files_deferred (recursive=False)
2024-04-26 11:06:57,117 - util.py[DEBUG]: Restoring selinux mode for /var/lib/cloud/instances/i-0a5ccc4a0f86755be/sem/config_write_files_deferred (recursive=False)
2024-04-26 11:06:57,117 - helpers.py[DEBUG]: Running config-write-files-deferred using lock (<FileLock using file '/var/lib/cloud/instances/i-0a5ccc4a0f86755be/sem/config_write_files_deferred'>)
2024-04-26 11:06:57,117 - cc_write_files_deferred.py[DEBUG]: Skipping module named write-files-deferred, no deferred file defined in configuration
2024-04-26 11:06:57,118 - handlers.py[DEBUG]: finish: modules-final/config-write-files-deferred: SUCCESS: config-write-files-deferred ran successfully
2024-04-26 11:06:57,118 - modules.py[DEBUG]: Running module puppet (<module 'cloudinit.config.cc_puppet' from '/usr/lib/python3.9/site-packages/cloudinit/config/cc_puppet.py'>) with frequency once-per-instance
2024-04-26 11:06:57,128 - handlers.py[DEBUG]: start: modules-final/config-puppet: running config-puppet with frequency once-per-instance
2024-04-26 11:06:57,129 - util.py[DEBUG]: Writing to /var/lib/cloud/instances/i-0a5ccc4a0f86755be/sem/config_puppet - wb: [644] 25 bytes
2024-04-26 11:06:57,130 - util.py[DEBUG]: Restoring selinux mode for /var/lib/cloud/instances/i-0a5ccc4a0f86755be/sem/config_puppet (recursive=False)
2024-04-26 11:06:57,131 - util.py[DEBUG]: Restoring selinux mode for /var/lib/cloud/instances/i-0a5ccc4a0f86755be/sem/config_puppet (recursive=False)
2024-04-26 11:06:57,131 - helpers.py[DEBUG]: Running config-puppet using lock (<FileLock using file '/var/lib/cloud/instances/i-0a5ccc4a0f86755be/sem/config_puppet'>)
2024-04-26 11:06:57,131 - cc_puppet.py[DEBUG]: Skipping module named puppet, no 'puppet' configuration found
2024-04-26 11:06:57,132 - handlers.py[DEBUG]: finish: modules-final/config-puppet: SUCCESS: config-puppet ran successfully
2024-04-26 11:06:57,132 - modules.py[DEBUG]: Running module chef (<module 'cloudinit.config.cc_chef' from '/usr/lib/python3.9/site-packages/cloudinit/config/cc_chef.py'>) with frequency always
2024-04-26 11:06:57,132 - handlers.py[DEBUG]: start: modules-final/config-chef: running config-chef with frequency always
2024-04-26 11:06:57,132 - helpers.py[DEBUG]: Running config-chef using lock (<cloudinit.helpers.DummyLock object at 0x7f7781cb1700>)
2024-04-26 11:06:57,132 - cc_chef.py[DEBUG]: Skipping module named chef, no 'chef' key in configuration
2024-04-26 11:06:57,132 - handlers.py[DEBUG]: finish: modules-final/config-chef: SUCCESS: config-chef ran successfully
2024-04-26 11:06:57,132 - modules.py[DEBUG]: Running module mcollective (<module 'cloudinit.config.cc_mcollective' from '/usr/lib/python3.9/site-packages/cloudinit/config/cc_mcollective.py'>) with frequency once-per-instance
2024-04-26 11:06:57,133 - handlers.py[DEBUG]: start: modules-final/config-mcollective: running config-mcollective with frequency once-per-instance
2024-04-26 11:06:57,133 - util.py[DEBUG]: Writing to /var/lib/cloud/instances/i-0a5ccc4a0f86755be/sem/config_mcollective - wb: [644] 25 bytes
2024-04-26 11:06:57,134 - util.py[DEBUG]: Restoring selinux mode for /var/lib/cloud/instances/i-0a5ccc4a0f86755be/sem/config_mcollective (recursive=False)
2024-04-26 11:06:57,135 - util.py[DEBUG]: Restoring selinux mode for /var/lib/cloud/instances/i-0a5ccc4a0f86755be/sem/config_mcollective (recursive=False)
2024-04-26 11:06:57,136 - helpers.py[DEBUG]: Running config-mcollective using lock (<FileLock using file '/var/lib/cloud/instances/i-0a5ccc4a0f86755be/sem/config_mcollective'>)
2024-04-26 11:06:57,136 - cc_mcollective.py[DEBUG]: Skipping module named mcollective, no 'mcollective' key in configuration
2024-04-26 11:06:57,136 - handlers.py[DEBUG]: finish: modules-final/config-mcollective: SUCCESS: config-mcollective ran successfully
2024-04-26 11:06:57,136 - modules.py[DEBUG]: Running module salt-minion (<module 'cloudinit.config.cc_salt_minion' from '/usr/lib/python3.9/site-packages/cloudinit/config/cc_salt_minion.py'>) with frequency once-per-instance
2024-04-26 11:06:57,136 - handlers.py[DEBUG]: start: modules-final/config-salt-minion: running config-salt-minion with frequency once-per-instance
2024-04-26 11:06:57,136 - util.py[DEBUG]: Writing to /var/lib/cloud/instances/i-0a5ccc4a0f86755be/sem/config_salt_minion - wb: [644] 25 bytes
2024-04-26 11:06:57,137 - util.py[DEBUG]: Restoring selinux mode for /var/lib/cloud/instances/i-0a5ccc4a0f86755be/sem/config_salt_minion (recursive=False)
2024-04-26 11:06:57,149 - util.py[DEBUG]: Restoring selinux mode for /var/lib/cloud/instances/i-0a5ccc4a0f86755be/sem/config_salt_minion (recursive=False)
2024-04-26 11:06:57,150 - helpers.py[DEBUG]: Running config-salt-minion using lock (<FileLock using file '/var/lib/cloud/instances/i-0a5ccc4a0f86755be/sem/config_salt_minion'>)
2024-04-26 11:06:57,150 - cc_salt_minion.py[DEBUG]: Skipping module named salt-minion, no 'salt_minion' key in configuration
2024-04-26 11:06:57,150 - handlers.py[DEBUG]: finish: modules-final/config-salt-minion: SUCCESS: config-salt-minion ran successfully
2024-04-26 11:06:57,150 - modules.py[DEBUG]: Running module reset_rmc (<module 'cloudinit.config.cc_reset_rmc' from '/usr/lib/python3.9/site-packages/cloudinit/config/cc_reset_rmc.py'>) with frequency once-per-instance
2024-04-26 11:06:57,150 - handlers.py[DEBUG]: start: modules-final/config-reset_rmc: running config-reset_rmc with frequency once-per-instance
2024-04-26 11:06:57,151 - util.py[DEBUG]: Writing to /var/lib/cloud/instances/i-0a5ccc4a0f86755be/sem/config_reset_rmc - wb: [644] 25 bytes
2024-04-26 11:06:57,151 - util.py[DEBUG]: Restoring selinux mode for /var/lib/cloud/instances/i-0a5ccc4a0f86755be/sem/config_reset_rmc (recursive=False)
2024-04-26 11:06:57,153 - util.py[DEBUG]: Restoring selinux mode for /var/lib/cloud/instances/i-0a5ccc4a0f86755be/sem/config_reset_rmc (recursive=False)
2024-04-26 11:06:57,154 - helpers.py[DEBUG]: Running config-reset_rmc using lock (<FileLock using file '/var/lib/cloud/instances/i-0a5ccc4a0f86755be/sem/config_reset_rmc'>)
2024-04-26 11:06:57,154 - cc_reset_rmc.py[DEBUG]: module disabled, RSCT_PATH not present
2024-04-26 11:06:57,154 - handlers.py[DEBUG]: finish: modules-final/config-reset_rmc: SUCCESS: config-reset_rmc ran successfully
2024-04-26 11:06:57,154 - modules.py[DEBUG]: Running module refresh_rmc_and_interface (<module 'cloudinit.config.cc_refresh_rmc_and_interface' from '/usr/lib/python3.9/site-packages/cloudinit/config/cc_refresh_rmc_and_interface.py'>) with frequency always
2024-04-26 11:06:57,154 - handlers.py[DEBUG]: start: modules-final/config-refresh_rmc_and_interface: running config-refresh_rmc_and_interface with frequency always
2024-04-26 11:06:57,154 - helpers.py[DEBUG]: Running config-refresh_rmc_and_interface using lock (<cloudinit.helpers.DummyLock object at 0x7f7781cb1700>)
2024-04-26 11:06:57,155 - cc_refresh_rmc_and_interface.py[DEBUG]: No 'rmcctrl' in path, disabled
2024-04-26 11:06:57,155 - handlers.py[DEBUG]: finish: modules-final/config-refresh_rmc_and_interface: SUCCESS: config-refresh_rmc_and_interface ran successfully
2024-04-26 11:06:57,155 - modules.py[DEBUG]: Running module rightscale_userdata (<module 'cloudinit.config.cc_rightscale_userdata' from '/usr/lib/python3.9/site-packages/cloudinit/config/cc_rightscale_userdata.py'>) with frequency once-per-instance
2024-04-26 11:06:57,155 - handlers.py[DEBUG]: start: modules-final/config-rightscale_userdata: running config-rightscale_userdata with frequency once-per-instance
2024-04-26 11:06:57,155 - util.py[DEBUG]: Writing to /var/lib/cloud/instances/i-0a5ccc4a0f86755be/sem/config_rightscale_userdata - wb: [644] 25 bytes
2024-04-26 11:06:57,156 - util.py[DEBUG]: Restoring selinux mode for /var/lib/cloud/instances/i-0a5ccc4a0f86755be/sem/config_rightscale_userdata (recursive=False)
2024-04-26 11:06:57,158 - util.py[DEBUG]: Restoring selinux mode for /var/lib/cloud/instances/i-0a5ccc4a0f86755be/sem/config_rightscale_userdata (recursive=False)
2024-04-26 11:06:57,158 - helpers.py[DEBUG]: Running config-rightscale_userdata using lock (<FileLock using file '/var/lib/cloud/instances/i-0a5ccc4a0f86755be/sem/config_rightscale_userdata'>)
2024-04-26 11:06:57,158 - cc_rightscale_userdata.py[DEBUG]: Failed to get raw userdata in module rightscale_userdata
2024-04-26 11:06:57,159 - handlers.py[DEBUG]: finish: modules-final/config-rightscale_userdata: SUCCESS: config-rightscale_userdata ran successfully
2024-04-26 11:06:57,159 - modules.py[DEBUG]: Running module scripts-vendor (<module 'cloudinit.config.cc_scripts_vendor' from '/usr/lib/python3.9/site-packages/cloudinit/config/cc_scripts_vendor.py'>) with frequency once-per-instance
2024-04-26 11:06:57,159 - handlers.py[DEBUG]: start: modules-final/config-scripts-vendor: running config-scripts-vendor with frequency once-per-instance
2024-04-26 11:06:57,159 - util.py[DEBUG]: Writing to /var/lib/cloud/instances/i-0a5ccc4a0f86755be/sem/config_scripts_vendor - wb: [644] 25 bytes
2024-04-26 11:06:57,160 - util.py[DEBUG]: Restoring selinux mode for /var/lib/cloud/instances/i-0a5ccc4a0f86755be/sem/config_scripts_vendor (recursive=False)
2024-04-26 11:06:57,161 - util.py[DEBUG]: Restoring selinux mode for /var/lib/cloud/instances/i-0a5ccc4a0f86755be/sem/config_scripts_vendor (recursive=False)
2024-04-26 11:06:57,162 - helpers.py[DEBUG]: Running config-scripts-vendor using lock (<FileLock using file '/var/lib/cloud/instances/i-0a5ccc4a0f86755be/sem/config_scripts_vendor'>)
2024-04-26 11:06:57,162 - handlers.py[DEBUG]: finish: modules-final/config-scripts-vendor: SUCCESS: config-scripts-vendor ran successfully
2024-04-26 11:06:57,163 - modules.py[DEBUG]: Running module scripts-per-once (<module 'cloudinit.config.cc_scripts_per_once' from '/usr/lib/python3.9/site-packages/cloudinit/config/cc_scripts_per_once.py'>) with frequency once
2024-04-26 11:06:57,163 - handlers.py[DEBUG]: start: modules-final/config-scripts-per-once: running config-scripts-per-once with frequency once
2024-04-26 11:06:57,163 - util.py[DEBUG]: Writing to /var/lib/cloud/sem/config_scripts_per_once.once - wb: [644] 24 bytes
2024-04-26 11:06:57,164 - util.py[DEBUG]: Restoring selinux mode for /var/lib/cloud/sem/config_scripts_per_once.once (recursive=False)
2024-04-26 11:06:57,165 - util.py[DEBUG]: Restoring selinux mode for /var/lib/cloud/sem/config_scripts_per_once.once (recursive=False)
2024-04-26 11:06:57,166 - helpers.py[DEBUG]: Running config-scripts-per-once using lock (<FileLock using file '/var/lib/cloud/sem/config_scripts_per_once.once'>)
2024-04-26 11:06:57,166 - handlers.py[DEBUG]: finish: modules-final/config-scripts-per-once: SUCCESS: config-scripts-per-once ran successfully
2024-04-26 11:06:57,166 - modules.py[DEBUG]: Running module scripts-per-boot (<module 'cloudinit.config.cc_scripts_per_boot' from '/usr/lib/python3.9/site-packages/cloudinit/config/cc_scripts_per_boot.py'>) with frequency always
2024-04-26 11:06:57,166 - handlers.py[DEBUG]: start: modules-final/config-scripts-per-boot: running config-scripts-per-boot with frequency always
2024-04-26 11:06:57,166 - helpers.py[DEBUG]: Running config-scripts-per-boot using lock (<cloudinit.helpers.DummyLock object at 0x7f7781cb1970>)
2024-04-26 11:06:57,167 - handlers.py[DEBUG]: finish: modules-final/config-scripts-per-boot: SUCCESS: config-scripts-per-boot ran successfully
2024-04-26 11:06:57,167 - modules.py[DEBUG]: Running module scripts-per-instance (<module 'cloudinit.config.cc_scripts_per_instance' from '/usr/lib/python3.9/site-packages/cloudinit/config/cc_scripts_per_instance.py'>) with frequency once-per-instance
2024-04-26 11:06:57,167 - handlers.py[DEBUG]: start: modules-final/config-scripts-per-instance: running config-scripts-per-instance with frequency once-per-instance
2024-04-26 11:06:57,168 - util.py[DEBUG]: Writing to /var/lib/cloud/instances/i-0a5ccc4a0f86755be/sem/config_scripts_per_instance - wb: [644] 24 bytes
2024-04-26 11:06:57,179 - util.py[DEBUG]: Restoring selinux mode for /var/lib/cloud/instances/i-0a5ccc4a0f86755be/sem/config_scripts_per_instance (recursive=False)
2024-04-26 11:06:57,180 - util.py[DEBUG]: Restoring selinux mode for /var/lib/cloud/instances/i-0a5ccc4a0f86755be/sem/config_scripts_per_instance (recursive=False)
2024-04-26 11:06:57,181 - helpers.py[DEBUG]: Running config-scripts-per-instance using lock (<FileLock using file '/var/lib/cloud/instances/i-0a5ccc4a0f86755be/sem/config_scripts_per_instance'>)
2024-04-26 11:06:57,181 - handlers.py[DEBUG]: finish: modules-final/config-scripts-per-instance: SUCCESS: config-scripts-per-instance ran successfully
2024-04-26 11:06:57,181 - modules.py[DEBUG]: Running module scripts-user (<module 'cloudinit.config.cc_scripts_user' from '/usr/lib/python3.9/site-packages/cloudinit/config/cc_scripts_user.py'>) with frequency once-per-instance
2024-04-26 11:06:57,182 - handlers.py[DEBUG]: start: modules-final/config-scripts-user: running config-scripts-user with frequency once-per-instance
2024-04-26 11:06:57,182 - util.py[DEBUG]: Writing to /var/lib/cloud/instances/i-0a5ccc4a0f86755be/sem/config_scripts_user - wb: [644] 25 bytes
2024-04-26 11:06:57,183 - util.py[DEBUG]: Restoring selinux mode for /var/lib/cloud/instances/i-0a5ccc4a0f86755be/sem/config_scripts_user (recursive=False)
2024-04-26 11:06:57,184 - util.py[DEBUG]: Restoring selinux mode for /var/lib/cloud/instances/i-0a5ccc4a0f86755be/sem/config_scripts_user (recursive=False)
2024-04-26 11:06:57,185 - helpers.py[DEBUG]: Running config-scripts-user using lock (<FileLock using file '/var/lib/cloud/instances/i-0a5ccc4a0f86755be/sem/config_scripts_user'>)
2024-04-26 11:06:57,185 - subp.py[DEBUG]: Running command ['/var/lib/cloud/instance/scripts/part-001'] with allowed return codes [0] (shell=False, capture=False)
2024-04-26 11:07:25,849 - subp.py[DEBUG]: Unexpected error while running command.
Command: ['/var/lib/cloud/instance/scripts/part-001']
Exit code: 1
Reason: -
Stdout: -
Stderr: -
2024-04-26 11:07:25,849 - cc_scripts_user.py[WARNING]: Failed to run module scripts-user (scripts in /var/lib/cloud/instance/scripts)
2024-04-26 11:07:25,849 - handlers.py[DEBUG]: finish: modules-final/config-scripts-user: FAIL: running config-scripts-user with frequency once-per-instance
2024-04-26 11:07:25,849 - util.py[WARNING]: Running module scripts-user (<module 'cloudinit.config.cc_scripts_user' from '/usr/lib/python3.9/site-packages/cloudinit/config/cc_scripts_user.py'>) failed
2024-04-26 11:07:25,850 - util.py[DEBUG]: Running module scripts-user (<module 'cloudinit.config.cc_scripts_user' from '/usr/lib/python3.9/site-packages/cloudinit/config/cc_scripts_user.py'>) failed
Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/cloudinit/config/modules.py", line 231, in _run_modules
    ran, _r = cc.run(
  File "/usr/lib/python3.9/site-packages/cloudinit/cloud.py", line 67, in run
    return self._runners.run(name, functor, args, freq, clear_on_fail)
  File "/usr/lib/python3.9/site-packages/cloudinit/helpers.py", line 185, in run
    results = functor(*args)
  File "/usr/lib/python3.9/site-packages/cloudinit/config/cc_scripts_user.py", line 48, in handle
    subp.runparts(runparts_path)
  File "/usr/lib/python3.9/site-packages/cloudinit/subp.py", line 427, in runparts
    raise RuntimeError(
RuntimeError: Runparts: 1 failures (part-001) in 1 attempted commands
2024-04-26 11:07:25,856 - modules.py[DEBUG]: Running module ssh-authkey-fingerprints (<module 'cloudinit.config.cc_ssh_authkey_fingerprints' from '/usr/lib/python3.9/site-packages/cloudinit/config/cc_ssh_authkey_fingerprints.py'>) with frequency once-per-instance
2024-04-26 11:07:25,856 - handlers.py[DEBUG]: start: modules-final/config-ssh-authkey-fingerprints: running config-ssh-authkey-fingerprints with frequency once-per-instance
2024-04-26 11:07:25,856 - util.py[DEBUG]: Writing to /var/lib/cloud/instances/i-0a5ccc4a0f86755be/sem/config_ssh_authkey_fingerprints - wb: [644] 25 bytes
2024-04-26 11:07:25,858 - util.py[DEBUG]: Restoring selinux mode for /var/lib/cloud/instances/i-0a5ccc4a0f86755be/sem/config_ssh_authkey_fingerprints (recursive=False)
2024-04-26 11:07:25,860 - util.py[DEBUG]: Restoring selinux mode for /var/lib/cloud/instances/i-0a5ccc4a0f86755be/sem/config_ssh_authkey_fingerprints (recursive=False)
2024-04-26 11:07:25,861 - helpers.py[DEBUG]: Running config-ssh-authkey-fingerprints using lock (<FileLock using file '/var/lib/cloud/instances/i-0a5ccc4a0f86755be/sem/config_ssh_authkey_fingerprints'>)
2024-04-26 11:07:25,862 - util.py[DEBUG]: Reading from /etc/ssh/sshd_config (quiet=False)
2024-04-26 11:07:25,862 - util.py[DEBUG]: Read 3854 bytes from /etc/ssh/sshd_config
2024-04-26 11:07:25,864 - util.py[DEBUG]: Restoring selinux mode for /home/ec2-user/.ssh (recursive=True)
2024-04-26 11:07:25,898 - util.py[DEBUG]: Reading from /home/ec2-user/.ssh/authorized_keys (quiet=False)
2024-04-26 11:07:25,898 - util.py[DEBUG]: Read 399 bytes from /home/ec2-user/.ssh/authorized_keys
2024-04-26 11:07:25,900 - handlers.py[DEBUG]: finish: modules-final/config-ssh-authkey-fingerprints: SUCCESS: config-ssh-authkey-fingerprints ran successfully
2024-04-26 11:07:25,900 - modules.py[DEBUG]: Running module keys-to-console (<module 'cloudinit.config.cc_keys_to_console' from '/usr/lib/python3.9/site-packages/cloudinit/config/cc_keys_to_console.py'>) with frequency once-per-instance
2024-04-26 11:07:25,901 - handlers.py[DEBUG]: start: modules-final/config-keys-to-console: running config-keys-to-console with frequency once-per-instance
2024-04-26 11:07:25,901 - util.py[DEBUG]: Writing to /var/lib/cloud/instances/i-0a5ccc4a0f86755be/sem/config_keys_to_console - wb: [644] 25 bytes
2024-04-26 11:07:25,902 - util.py[DEBUG]: Restoring selinux mode for /var/lib/cloud/instances/i-0a5ccc4a0f86755be/sem/config_keys_to_console (recursive=False)
2024-04-26 11:07:25,903 - util.py[DEBUG]: Restoring selinux mode for /var/lib/cloud/instances/i-0a5ccc4a0f86755be/sem/config_keys_to_console (recursive=False)
2024-04-26 11:07:25,904 - helpers.py[DEBUG]: Running config-keys-to-console using lock (<FileLock using file '/var/lib/cloud/instances/i-0a5ccc4a0f86755be/sem/config_keys_to_console'>)
2024-04-26 11:07:25,904 - subp.py[DEBUG]: Running command ['/usr/libexec/cloud-init/write-ssh-key-fingerprints', '', 'ssh-dss'] with allowed return codes [0] (shell=False, capture=True)
2024-04-26 11:07:25,960 - handlers.py[DEBUG]: finish: modules-final/config-keys-to-console: SUCCESS: config-keys-to-console ran successfully
2024-04-26 11:07:25,960 - modules.py[DEBUG]: Running module install-hotplug (<module 'cloudinit.config.cc_install_hotplug' from '/usr/lib/python3.9/site-packages/cloudinit/config/cc_install_hotplug.py'>) with frequency once-per-instance
2024-04-26 11:07:25,960 - handlers.py[DEBUG]: start: modules-final/config-install-hotplug: running config-install-hotplug with frequency once-per-instance
2024-04-26 11:07:25,961 - util.py[DEBUG]: Writing to /var/lib/cloud/instances/i-0a5ccc4a0f86755be/sem/config_install_hotplug - wb: [644] 25 bytes
2024-04-26 11:07:25,962 - util.py[DEBUG]: Restoring selinux mode for /var/lib/cloud/instances/i-0a5ccc4a0f86755be/sem/config_install_hotplug (recursive=False)
2024-04-26 11:07:25,964 - util.py[DEBUG]: Restoring selinux mode for /var/lib/cloud/instances/i-0a5ccc4a0f86755be/sem/config_install_hotplug (recursive=False)
2024-04-26 11:07:25,964 - helpers.py[DEBUG]: Running config-install-hotplug using lock (<FileLock using file '/var/lib/cloud/instances/i-0a5ccc4a0f86755be/sem/config_install_hotplug'>)
2024-04-26 11:07:25,965 - stages.py[DEBUG]: Allowed events: {<EventScope.NETWORK: 'network'>: {<EventType.BOOT_NEW_INSTANCE: 'boot-new-instance'>}}
2024-04-26 11:07:25,965 - stages.py[DEBUG]: Event Denied: scopes=['network'] EventType=hotplug
2024-04-26 11:07:25,965 - cc_install_hotplug.py[DEBUG]: Skipping hotplug install, not enabled
2024-04-26 11:07:25,965 - handlers.py[DEBUG]: finish: modules-final/config-install-hotplug: SUCCESS: config-install-hotplug ran successfully
2024-04-26 11:07:25,965 - modules.py[DEBUG]: Running module phone-home (<module 'cloudinit.config.cc_phone_home' from '/usr/lib/python3.9/site-packages/cloudinit/config/cc_phone_home.py'>) with frequency once-per-instance
2024-04-26 11:07:25,966 - handlers.py[DEBUG]: start: modules-final/config-phone-home: running config-phone-home with frequency once-per-instance
2024-04-26 11:07:25,966 - util.py[DEBUG]: Writing to /var/lib/cloud/instances/i-0a5ccc4a0f86755be/sem/config_phone_home - wb: [644] 24 bytes
2024-04-26 11:07:25,967 - util.py[DEBUG]: Restoring selinux mode for /var/lib/cloud/instances/i-0a5ccc4a0f86755be/sem/config_phone_home (recursive=False)
2024-04-26 11:07:25,968 - util.py[DEBUG]: Restoring selinux mode for /var/lib/cloud/instances/i-0a5ccc4a0f86755be/sem/config_phone_home (recursive=False)
2024-04-26 11:07:25,975 - helpers.py[DEBUG]: Running config-phone-home using lock (<FileLock using file '/var/lib/cloud/instances/i-0a5ccc4a0f86755be/sem/config_phone_home'>)
2024-04-26 11:07:25,976 - cc_phone_home.py[DEBUG]: Skipping module named phone-home, no 'phone_home' configuration found
2024-04-26 11:07:25,976 - handlers.py[DEBUG]: finish: modules-final/config-phone-home: SUCCESS: config-phone-home ran successfully
2024-04-26 11:07:25,976 - modules.py[DEBUG]: Running module final-message (<module 'cloudinit.config.cc_final_message' from '/usr/lib/python3.9/site-packages/cloudinit/config/cc_final_message.py'>) with frequency always
2024-04-26 11:07:25,976 - handlers.py[DEBUG]: start: modules-final/config-final-message: running config-final-message with frequency always
2024-04-26 11:07:25,976 - helpers.py[DEBUG]: Running config-final-message using lock (<cloudinit.helpers.DummyLock object at 0x7f7781f6db80>)
2024-04-26 11:07:25,976 - util.py[DEBUG]: Reading from /proc/uptime (quiet=False)
2024-04-26 11:07:25,976 - util.py[DEBUG]: Read 11 bytes from /proc/uptime
2024-04-26 11:07:25,985 - util.py[DEBUG]: Cloud-init v. 22.2.2 finished at Fri, 26 Apr 2024 11:07:25 +0000. Datasource DataSourceEc2.  Up 42.62 seconds
2024-04-26 11:07:25,985 - util.py[DEBUG]: Writing to /var/lib/cloud/instance/boot-finished - wb: [644] 52 bytes
2024-04-26 11:07:25,986 - util.py[DEBUG]: Restoring selinux mode for /var/lib/cloud/instances/i-0a5ccc4a0f86755be/boot-finished (recursive=False)
2024-04-26 11:07:25,987 - util.py[DEBUG]: Restoring selinux mode for /var/lib/cloud/instances/i-0a5ccc4a0f86755be/boot-finished (recursive=False)
2024-04-26 11:07:25,988 - handlers.py[DEBUG]: finish: modules-final/config-final-message: SUCCESS: config-final-message ran successfully
2024-04-26 11:07:25,988 - modules.py[DEBUG]: Running module power-state-change (<module 'cloudinit.config.cc_power_state_change' from '/usr/lib/python3.9/site-packages/cloudinit/config/cc_power_state_change.py'>) with frequency once-per-instance
2024-04-26 11:07:25,988 - handlers.py[DEBUG]: start: modules-final/config-power-state-change: running config-power-state-change with frequency once-per-instance
2024-04-26 11:07:25,989 - util.py[DEBUG]: Writing to /var/lib/cloud/instances/i-0a5ccc4a0f86755be/sem/config_power_state_change - wb: [644] 25 bytes
2024-04-26 11:07:25,989 - util.py[DEBUG]: Restoring selinux mode for /var/lib/cloud/instances/i-0a5ccc4a0f86755be/sem/config_power_state_change (recursive=False)
2024-04-26 11:07:25,990 - util.py[DEBUG]: Restoring selinux mode for /var/lib/cloud/instances/i-0a5ccc4a0f86755be/sem/config_power_state_change (recursive=False)
2024-04-26 11:07:25,991 - helpers.py[DEBUG]: Running config-power-state-change using lock (<FileLock using file '/var/lib/cloud/instances/i-0a5ccc4a0f86755be/sem/config_power_state_change'>)
2024-04-26 11:07:25,991 - util.py[DEBUG]: Reading from /proc/1654/cmdline (quiet=False)
2024-04-26 11:07:25,991 - util.py[DEBUG]: Read 58 bytes from /proc/1654/cmdline
2024-04-26 11:07:25,991 - cc_power_state_change.py[DEBUG]: After pid 1654 ends, will execute: shutdown -r now Rebooting machine to apply SELinux kernel commandline setting
2024-04-26 11:07:25,993 - util.py[DEBUG]: Forked child 1882 who will run callback run_after_pid_gone
2024-04-26 11:07:25,994 - handlers.py[DEBUG]: finish: modules-final/config-power-state-change: SUCCESS: config-power-state-change ran successfully
2024-04-26 11:07:25,994 - main.py[DEBUG]: Ran 20 modules with 1 failures
2024-04-26 11:07:25,995 - atomic_helper.py[DEBUG]: Atomically writing to file /var/lib/cloud/data/status.json (via temporary file /var/lib/cloud/data/tmpjjp4jd7f) - w: [644] 642 bytes/chars
2024-04-26 11:07:25,996 - atomic_helper.py[DEBUG]: Atomically writing to file /var/lib/cloud/data/result.json (via temporary file /var/lib/cloud/data/tmpy1dme4e8) - w: [644] 162 bytes/chars
2024-04-26 11:07:25,996 - util.py[DEBUG]: Creating symbolic link from '/run/cloud-init/result.json' => '../../var/lib/cloud/data/result.json'
2024-04-26 11:07:25,996 - util.py[DEBUG]: Reading from /proc/uptime (quiet=False)
2024-04-26 11:07:25,996 - util.py[DEBUG]: Read 11 bytes from /proc/uptime
2024-04-26 11:07:25,996 - util.py[DEBUG]: cloud-init mode 'modules' took 29.219 seconds (29.22)
2024-04-26 11:07:25,996 - handlers.py[DEBUG]: finish: modules-final: FAIL: running modules for final
2024-04-26 11:07:26,009 - util.py[DEBUG]: Reading from /proc/1654/cmdline (quiet=False)
2024-04-26 11:07:26,010 - util.py[DEBUG]: Read 58 bytes from /proc/1654/cmdline
2024-04-26 11:07:26,261 - util.py[DEBUG]: Reading from /proc/1654/cmdline (quiet=False)
2024-04-26 11:07:26,261 - cc_power_state_change.py[DEBUG]: cmdline changed for 1654 [now: None]
2024-04-26 11:07:26,267 - cc_power_state_change.py[DEBUG]: check_condition command (test -f /run/cloud-init-selinux-reboot): exited 1. condition not met.

ユーザーデータで指定した処理は/var/lib/cloud/instance/scripts/part-001として実行され、失敗したことは確認できます。ただし、その原因となるようなログは見当たりません。

dnf history

裏側でdnfの処理が動いているのでしょうか。dnf historyを叩いてみます。

$ dnf history
ID     | Command line                                                                                                                            | Date and time    | Action(s)      | Altered
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
     1 | upgrade -y --releasever=latest                                                                                                          | 2024-04-26 11:07 | I, U           |   66 ##

$ dnf history info 1
Transaction ID : 1
Begin time     : Fri Apr 26 11:07:24 2024
Begin rpmdb    : c9ac7aea536740941065783aca4fcf99fad8c9e30b96798036c581d86e290bda
End time       : Thu Jan  1 00:00:00 1970 (-1714129644 seconds)
End rpmdb      :  **
User           : System <unset>
Return-Code    : Failure: 1
Releasever     :
Command Line   : upgrade -y --releasever=latest
Comment        :
Packages Altered:
 ** Install  kernel-6.1.84-99.169.amzn2023.x86_64                       @amazonlinux
 ** Install  libsss_sudo-2.9.4-1.amzn2023.0.1.x86_64                    @amazonlinux
 ** Install  python3-systemd-235-51.amzn2023.0.2.x86_64                 @amazonlinux
.
.
(中略)
.
.
 ** Upgraded util-linux-core-2.37.4-1.amzn2023.0.3.x86_64               @@System
 ** Upgrade  yum-4.14.0-1.amzn2023.0.4.noarch                           @amazonlinux
 ** Upgraded yum-4.12.0-2.amzn2023.0.4.noarch                           @@System

ユーザーデータで指定したdnf upgrade -y --releasever=latestしか記録されていませんでした。

/var/log/dnf.log

/var/log/dnf.logを表示してdnfの詳細なログも確認してみましょう。

$ sudo cat /var/log/dnf.log
2024-03-01T22:04:49Z INFO --- logging initialized ---
2024-03-01T22:04:49Z DDEBUG timer: config: 18 ms
2024-03-01T22:04:49Z DEBUG DNF version: 4.0.9
.
.
(中略)
.
.
2024-03-01T22:06:46Z INFO --- logging initialized ---
2024-03-01T22:06:46Z DDEBUG timer: config: 3 ms
2024-03-01T22:06:46Z DEBUG DNF version: 4.0.9
2024-03-01T22:06:46Z DDEBUG Command: dnf -c /tmp/imagebuilder-G04EeY/dnfconf-uGjshw -d10 -e10 --installroot=/tmp/imagebuilder-G04EeY/imageroot -y clean all
2024-03-01T22:06:46Z DDEBUG Installroot: /tmp/imagebuilder-G04EeY/imageroot
2024-03-01T22:06:46Z DDEBUG Releasever: 2023.3.20240304
2024-03-01T22:06:46Z DEBUG cachedir: /tmp/imagebuilder-G04EeY/imageroot/tmp/var/cache/dnf/x86_64/2023.3.20240304
2024-03-01T22:06:46Z DDEBUG Base command: clean
2024-03-01T22:06:46Z DDEBUG Extra commands: [u'-c', u'/tmp/imagebuilder-G04EeY/dnfconf-uGjshw', u'-d10', u'-e10', u'--installroot=/tmp/imagebuilder-G04EeY/imageroot', u'-y', u'clean', u'all']
2024-03-01T22:06:46Z DEBUG Cleaning data: packages dbcache metadata
2024-03-01T22:06:46Z INFO 0 files removed
2024-03-01T22:06:46Z DDEBUG Cleaning up.
2024-04-26T11:06:58+0000 INFO --- logging initialized ---
2024-04-26T11:06:58+0000 DDEBUG timer: config: 4 ms
2024-04-26T11:06:58+0000 DEBUG Loaded plugins: builddep, changelog, config-manager, copr, debug, debuginfo-install, download, generate_completion_cache, groups-manager, needs-restarting, playground, release-notification, repoclosure, repodiff, repograph, repomanage, reposync, supportinfo
2024-04-26T11:06:58+0000 DEBUG DNF version: 4.12.0
2024-04-26T11:06:58+0000 DDEBUG Command: dnf upgrade -y --releasever=latest
2024-04-26T11:06:58+0000 DDEBUG Installroot: /
2024-04-26T11:06:58+0000 DDEBUG Releasever: latest
2024-04-26T11:06:58+0000 DEBUG cachedir: /var/cache/dnf
2024-04-26T11:06:58+0000 DDEBUG Base command: upgrade
2024-04-26T11:06:58+0000 DDEBUG Extra commands: ['upgrade', '-y', '--releasever=latest']
2024-04-26T11:06:58+0000 DEBUG User-Agent: constructed: 'libdnf (Amazon Linux 2023; generic; Linux.x86_64)'
2024-04-26T11:06:59+0000 DEBUG repo: downloading from remote: amazonlinux
2024-04-26T11:07:14+0000 DEBUG amazonlinux: using metadata from Thu Apr 11 18:50:19 2024.
2024-04-26T11:07:14+0000 DEBUG repo: downloading from remote: kernel-livepatch
2024-04-26T11:07:15+0000 DEBUG kernel-livepatch: using metadata from Wed Dec  6 18:07:59 2023.
2024-04-26T11:07:15+0000 DDEBUG timer: sack setup: 16730 ms
2024-04-26T11:07:15+0000 DEBUG Completion plugin: Generating completion cache...
2024-04-26T11:07:16+0000 DEBUG --> Starting dependency resolution
2024-04-26T11:07:16+0000 DEBUG ---> Package kernel.x86_64 6.1.84-99.169.amzn2023 will be installed
2024-04-26T11:07:16+0000 DEBUG ---> Package libsss_sudo.x86_64 2.9.4-1.amzn2023.0.1 will be installed
.
.
(中略)
.
.
2024-04-26T11:07:16+0000 DEBUG ---> Package yum.noarch 4.12.0-2.amzn2023.0.4 will be upgraded
2024-04-26T11:07:16+0000 DEBUG ---> Package yum.noarch 4.14.0-1.amzn2023.0.4 will be an upgrade
2024-04-26T11:07:16+0000 DEBUG --> Finished dependency resolution
2024-04-26T11:07:16+0000 DDEBUG timer: depsolve: 141 ms
2024-04-26T11:07:16+0000 INFO Dependencies resolved.
2024-04-26T11:07:16+0000 INFO ================================================================================
 Package                    Arch   Version                    Repository   Size
================================================================================
Installing:
 kernel                     x86_64 6.1.84-99.169.amzn2023     amazonlinux  31 M
Upgrading:
 amazon-linux-repo-s3       noarch 2023.4.20240416-1.amzn2023 amazonlinux  16 k
 amazon-ssm-agent           x86_64 3.3.131.0-1.amzn2023       amazonlinux  24 M
 c-ares                     x86_64 1.19.0-1.amzn2023.0.1      amazonlinux 110 k
.
.
(中略)
.
.
 util-linux                 x86_64 2.37.4-1.amzn2023.0.4      amazonlinux 2.2 M
 util-linux-core            x86_64 2.37.4-1.amzn2023.0.4      amazonlinux 432 k
 yum                        noarch 4.14.0-1.amzn2023.0.4      amazonlinux  37 k
Installing dependencies:
 libsss_sudo                x86_64 2.9.4-1.amzn2023.0.1       amazonlinux  31 k
 python3-systemd            x86_64 235-51.amzn2023.0.2        amazonlinux  91 k
 sssd-nfs-idmap             x86_64 2.9.4-1.amzn2023.0.1       amazonlinux  35 k

Transaction Summary
================================================================================
Install   4 Packages
Upgrade  62 Packages

2024-04-26T11:07:16+0000 INFO Total download size: 106 M
2024-04-26T11:07:16+0000 INFO Downloading Packages:
2024-04-26T11:07:19+0000 INFO --------------------------------------------------------------------------------
2024-04-26T11:07:19+0000 INFO Total                                            38 MB/s | 106 MB     00:02
2024-04-26T11:07:19+0000 DEBUG Using rpmkeys executable at /usr/bin/rpmkeys to verify signatures
2024-04-26T11:07:22+0000 INFO Running transaction check
2024-04-26T11:07:22+0000 INFO Transaction check succeeded.
2024-04-26T11:07:22+0000 INFO Running transaction test
2024-04-26T11:07:24+0000 INFO Transaction test succeeded.
2024-04-26T11:07:24+0000 DDEBUG timer: transaction test: 1949 ms
2024-04-26T11:07:24+0000 INFO Running transaction
2024-04-26T11:07:24+0000 DEBUG RPMDB altered outside of DNF.
2024-04-26T11:07:25+0000 DDEBUG RPM transaction start.
2024-04-26T11:07:25+0000 DDEBUG RPM transaction over.
2024-04-26T11:07:25+0000 CRITICAL RPM: error: can't create transaction lock on /var/lib/rpm/.rpm.lock (Resource temporarily unavailable)
2024-04-26T11:07:25+0000 DDEBUG Cleaning up.
2024-04-26T11:07:25+0000 INFO The downloaded packages were saved in cache until the next successful transaction.
2024-04-26T11:07:25+0000 INFO You can remove cached packages by executing 'dnf clean packages'.
2024-04-26T11:07:25+0000 SUBDEBUG
Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/dnf/cli/main.py", line 67, in main
    return _main(base, args, cli_class, option_parser_class)
  File "/usr/lib/python3.9/site-packages/dnf/cli/main.py", line 106, in _main
    return cli_run(cli, base)
  File "/usr/lib/python3.9/site-packages/dnf/cli/main.py", line 130, in cli_run
    ret = resolving(cli, base)
  File "/usr/lib/python3.9/site-packages/dnf/cli/main.py", line 176, in resolving
    base.do_transaction(display=displays)
  File "/usr/lib/python3.9/site-packages/dnf/cli/cli.py", line 246, in do_transaction
    tid = super(BaseCli, self).do_transaction(display)
  File "/usr/lib/python3.9/site-packages/dnf/base.py", line 1029, in do_transaction
    tid = self._run_transaction(cb=cb)
  File "/usr/lib/python3.9/site-packages/dnf/base.py", line 1148, in _run_transaction
    raise dnf.exceptions.Error(msg)
dnf.exceptions.Error: Could not run transaction.
2024-04-26T11:07:25+0000 CRITICAL Error: Could not run transaction.
2024-04-26T11:07:26+0000 INFO --- logging initialized ---
2024-04-26T11:07:26+0000 DDEBUG timer: config: 3 ms
2024-04-26T11:07:26+0000 DEBUG Loaded plugins: builddep, changelog, config-manager, copr, debug, debuginfo-install, download, generate_completion_cache, groups-manager, needs-restarting, playground, release-notification, repoclosure, repodiff, repograph, repomanage, reposync, supportinfo
2024-04-26T11:07:26+0000 DEBUG DNF version: 4.12.0
2024-04-26T11:07:26+0000 DDEBUG Command: dnf --debuglevel 2 updateinfo
2024-04-26T11:07:26+0000 DDEBUG Installroot: /
2024-04-26T11:07:26+0000 DDEBUG Releasever: 2023.3.20240304
2024-04-26T11:07:26+0000 DEBUG cachedir: /var/cache/dnf
2024-04-26T11:07:26+0000 DDEBUG Base command: updateinfo
2024-04-26T11:07:26+0000 DDEBUG Extra commands: ['--debuglevel', '2', 'updateinfo']
2024-04-26T11:07:26+0000 DEBUG User-Agent: constructed: 'libdnf (Amazon Linux 2023; generic; Linux.x86_64)'
2024-04-26T11:07:26+0000 DEBUG repo: downloading from remote: amazonlinux
2024-04-26T11:07:34+0000 DEBUG amazonlinux: using metadata from Fri Mar  1 00:01:51 2024.
2024-04-26T11:07:34+0000 DEBUG repo: using cache for: kernel-livepatch
2024-04-26T11:07:34+0000 DEBUG kernel-livepatch: using metadata from Wed Dec  6 18:07:59 2023.
2024-04-26T11:07:34+0000 INFO Last metadata expiration check: 0:00:08 ago on Fri Apr 26 11:07:26 2024.
2024-04-26T11:07:34+0000 DDEBUG timer: sack setup: 8182 ms
2024-04-26T11:07:34+0000 DEBUG Completion plugin: Generating completion cache...
2024-04-26T11:07:35+0000 DDEBUG Cleaning up.
2024-04-26T11:07:35+0000 INFO --- logging initialized ---
2024-04-26T11:07:35+0000 DDEBUG timer: config: 6 ms
2024-04-26T11:07:35+0000 DEBUG Loaded plugins: builddep, changelog, config-manager, copr, debug, debuginfo-install, download, generate_completion_cache, groups-manager, needs-restarting, playground, release-notification, repoclosure, repodiff, repograph, repomanage, reposync, supportinfo
2024-04-26T11:07:35+0000 DEBUG DNF version: 4.12.0
2024-04-26T11:07:35+0000 DDEBUG Command: dnf check-release-update
2024-04-26T11:07:35+0000 DDEBUG Installroot: /
2024-04-26T11:07:35+0000 DDEBUG Releasever: 2023.3.20240304
2024-04-26T11:07:35+0000 DEBUG cachedir: /var/cache/dnf
2024-04-26T11:07:35+0000 DDEBUG Base command: check-release-update
2024-04-26T11:07:35+0000 DDEBUG Extra commands: ['check-release-update']
2024-04-26T11:07:36+0000 WARNING WARNING:
  A newer release of "Amazon Linux" is available.

  Available Versions:

  Version 2023.3.20240312:
    Run the following command to upgrade to 2023.3.20240312:

      dnf upgrade --releasever=2023.3.20240312

    Release notes:
     https://docs.aws.amazon.com/linux/al2023/release-notes/relnotes-2023.3.20240312.html

  Version 2023.4.20240319:
    Run the following command to upgrade to 2023.4.20240319:

      dnf upgrade --releasever=2023.4.20240319

    Release notes:
     https://docs.aws.amazon.com/linux/al2023/release-notes/relnotes-2023.4.20240319.html

  Version 2023.4.20240401:
    Run the following command to upgrade to 2023.4.20240401:

      dnf upgrade --releasever=2023.4.20240401

    Release notes:
     https://docs.aws.amazon.com/linux/al2023/release-notes/relnotes-2023.4.20240401.html

  Version 2023.4.20240416:
    Run the following command to upgrade to 2023.4.20240416:

      dnf upgrade --releasever=2023.4.20240416

    Release notes:
     https://docs.aws.amazon.com/linux/al2023/release-notes/relnotes-2023.4.20240416.html

2024-04-26T11:07:36+0000 DDEBUG Cleaning up.

デバッグレベルでのログでも今まで以上の新しい情報は見つけられませんでした。

/etc/cloud/cloud.cfg

cloud-initの設定ファイル/etc/cloud/cloud.cfgを確認します。

$ sudo cat /etc/cloud/cloud.cfg
# The top level settings are used as module
# and system configuration.
# A set of users which may be applied and/or used by various modules
# when a 'default' entry is found it will reference the 'default_user'
# from the distro configuration specified below
users:
   - default


# If this is set, 'root' will not be able to ssh in and they
# will get a message to login instead as the default $user
disable_root: true

mount_default_fields: [~, ~, 'auto', 'defaults,nofail', '0', '2']
resize_rootfs: noblock
resize_rootfs_tmp: /dev
ssh_pwauth:   false

# This will cause the set+update hostname module to not operate (if true)
preserve_hostname: false

# If you use datasource_list array, keep array items in a single line.
# If you use multi line array, ds-identify script won't read array items.
# Example datasource config
# datasource:
#    Ec2:
#      metadata_urls: [ 'blah.com' ]
#      timeout: 5 # (defaults to 50 seconds)
#      max_wait: 10 # (defaults to 120 seconds)



# The modules that run in the 'init' stage
cloud_init_modules:
 - migrator
 - seed_random
 - bootcmd
 - write-files
 - write-metadata
 - growpart
 - resizefs
 - disk_setup
 - mounts
 - set_hostname
 - update_hostname
 - update_etc_hosts
 - ca-certs
 - rsyslog
 - selinux
 - users-groups
 - ssh

# The modules that run in the 'config' stage
cloud_config_modules:
 - ssh-import-id
 - keyboard
 - locale
 - set-passwords
 - yum-variables
 - yum-add-repo
 - ntp
 - timezone
 - disable-ec2-metadata
 - runcmd

# The modules that run in the 'final' stage
cloud_final_modules:
 - package-update-upgrade-install
 - write-files-deferred
 - puppet
 - chef
 - mcollective
 - salt-minion
 - reset_rmc
 - refresh_rmc_and_interface
 - rightscale_userdata
 - scripts-vendor
 - scripts-per-once
 - scripts-per-boot
 - scripts-per-instance
 - scripts-user
 - ssh-authkey-fingerprints
 - keys-to-console
 - install-hotplug
 - phone-home
 - final-message
 - power-state-change

# System and/or distro specific settings
# (not accessible to handlers/transforms)
system_info:
   # This will affect which distro class gets used
   distro: amazon
   # Default user name + that default users groups (if added/used)
   default_user:
     name: ec2-user
     lock_passwd: True
     gecos: EC2 Default User
     groups: [wheel, adm, systemd-journal]
     sudo: ["ALL=(ALL) NOPASSWD:ALL"]
     shell: /bin/bash
   # Other config here will be given to the distro class and/or path classes
   paths:
      cloud_dir: /var/lib/cloud/
      templates_dir: /etc/cloud/templates/
   ssh_svcname: sshd

ユーザーデータはscripts-userで実行されていましたが、/var/log/cloud-init.logを見るに、特に競合するような処理は同時に走っていなさそうです。

ジャーナル

最後にジャーナルを確認します。

$ sudo journalctl -x
.
.
(中略)
.
.
Apr 26 11:06:57 ip-172-31-18-56.ec2.internal cloud-init[1662]: + dnf upgrade -y --releasever=latest
Apr 26 11:06:58 ip-172-31-18-56.ec2.internal amazon-ssm-agent[1612]: 2024-04-26 11:06:58 INFO [amazon-ssm-agent] [LongRunningWorkerContainer] [WorkerProvider] Worker ssm-agent-worker is not running, st>
Apr 26 11:06:58 ip-172-31-18-56.ec2.internal amazon-ssm-agent[1612]: 2024-04-26 11:06:58 INFO [amazon-ssm-agent] [LongRunningWorkerContainer] [WorkerProvider] Worker ssm-agent-worker (pid:1666) started
Apr 26 11:06:58 ip-172-31-18-56.ec2.internal amazon-ssm-agent[1612]: 2024-04-26 11:06:58 INFO [amazon-ssm-agent] [LongRunningWorkerContainer] Monitor long running worker health every 60 seconds
Apr 26 11:06:59 ip-172-31-18-56.ec2.internal rngd[1420]: [jitter]: Enabling JITTER rng support
Apr 26 11:06:59 ip-172-31-18-56.ec2.internal rngd[1420]: [jitter]: Initialized
Apr 26 11:06:59 ip-172-31-18-56.ec2.internal cloud-init[1662]: Amazon Linux 2023 repository                     30 MB/s |  23 MB     00:00
Apr 26 11:07:00 ip-172-31-18-56.ec2.internal audit[1624]: AVC avc:  denied  { checkpoint_restore } for  pid=1624 comm="agetty" capability=40  scontext=system_u:system_r:getty_t:s0-s0:c0.c1023 tcontext=>
Apr 26 11:07:01 ip-172-31-18-56.ec2.internal chronyd[1648]: Selected source 169.254.169.123
Apr 26 11:07:15 ip-172-31-18-56.ec2.internal cloud-init[1662]: Amazon Linux 2023 Kernel Livepatch repository   422 kB/s | 165 kB     00:00
Apr 26 11:07:16 ip-172-31-18-56.ec2.internal systemd[1]: Stopping amazon-ssm-agent.service - amazon-ssm-agent...
░░ Subject: A stop job for unit amazon-ssm-agent.service has begun execution
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
░░
░░ A stop job for unit amazon-ssm-agent.service has begun execution.
░░
░░ The job identifier is 663.
Apr 26 11:07:16 ip-172-31-18-56.ec2.internal amazon-ssm-agent[1612]: 2024-04-26 11:07:16 INFO [amazon-ssm-agent] amazon-ssm-agent got signal:terminated value:0x55f1a648b1a0
Apr 26 11:07:16 ip-172-31-18-56.ec2.internal amazon-ssm-agent[1612]: 2024-04-26 11:07:16 INFO [amazon-ssm-agent] Stopping Core Agent
Apr 26 11:07:16 ip-172-31-18-56.ec2.internal amazon-ssm-agent[1612]: 2024-04-26 11:07:16 INFO [amazon-ssm-agent] [LongRunningWorkerContainer] Receiving stop signal, stop worker monitor
Apr 26 11:07:16 ip-172-31-18-56.ec2.internal cloud-init[1662]: Dependencies resolved.
Apr 26 11:07:16 ip-172-31-18-56.ec2.internal cloud-init[1662]: ================================================================================
Apr 26 11:07:16 ip-172-31-18-56.ec2.internal cloud-init[1662]:  Package                    Arch   Version                    Repository   Size
Apr 26 11:07:16 ip-172-31-18-56.ec2.internal cloud-init[1662]: ================================================================================
Apr 26 11:07:16 ip-172-31-18-56.ec2.internal cloud-init[1662]: Installing:
Apr 26 11:07:16 ip-172-31-18-56.ec2.internal cloud-init[1662]:  kernel                     x86_64 6.1.84-99.169.amzn2023     amazonlinux  31 M
Apr 26 11:07:16 ip-172-31-18-56.ec2.internal cloud-init[1662]: Upgrading:
Apr 26 11:07:16 ip-172-31-18-56.ec2.internal cloud-init[1662]:  amazon-linux-repo-s3       noarch 2023.4.20240416-1.amzn2023 amazonlinux  16 k
Apr 26 11:07:16 ip-172-31-18-56.ec2.internal cloud-init[1662]:  amazon-ssm-agent           x86_64 3.3.131.0-1.amzn2023       amazonlinux  24 M
Apr 26 11:07:16 ip-172-31-18-56.ec2.internal cloud-init[1662]:  c-ares                     x86_64 1.19.0-1.amzn2023.0.1      amazonlinux 110 k
.
.
(中略)
.
.
Apr 26 11:07:17 ip-172-31-18-56.ec2.internal cloud-init[1662]:  util-linux                 x86_64 2.37.4-1.amzn2023.0.4      amazonlinux 2.2 M
Apr 26 11:07:17 ip-172-31-18-56.ec2.internal cloud-init[1662]:  util-linux-core            x86_64 2.37.4-1.amzn2023.0.4      amazonlinux 432 k
Apr 26 11:07:17 ip-172-31-18-56.ec2.internal cloud-init[1662]:  yum                        noarch 4.14.0-1.amzn2023.0.4      amazonlinux  37 k
Apr 26 11:07:17 ip-172-31-18-56.ec2.internal cloud-init[1662]: Installing dependencies:
Apr 26 11:07:17 ip-172-31-18-56.ec2.internal cloud-init[1662]:  libsss_sudo                x86_64 2.9.4-1.amzn2023.0.1       amazonlinux  31 k
Apr 26 11:07:17 ip-172-31-18-56.ec2.internal cloud-init[1662]:  python3-systemd            x86_64 235-51.amzn2023.0.2        amazonlinux  91 k
Apr 26 11:07:17 ip-172-31-18-56.ec2.internal cloud-init[1662]:  sssd-nfs-idmap             x86_64 2.9.4-1.amzn2023.0.1       amazonlinux  35 k
Apr 26 11:07:17 ip-172-31-18-56.ec2.internal cloud-init[1662]: Transaction Summary
Apr 26 11:07:17 ip-172-31-18-56.ec2.internal cloud-init[1662]: ================================================================================
Apr 26 11:07:17 ip-172-31-18-56.ec2.internal cloud-init[1662]: Install   4 Packages
Apr 26 11:07:17 ip-172-31-18-56.ec2.internal cloud-init[1662]: Upgrade  62 Packages
Apr 26 11:07:17 ip-172-31-18-56.ec2.internal cloud-init[1662]: Total download size: 106 M
Apr 26 11:07:17 ip-172-31-18-56.ec2.internal cloud-init[1662]: Downloading Packages:
Apr 26 11:07:17 ip-172-31-18-56.ec2.internal cloud-init[1662]: (1/66): libsss_sudo-2.9.4-1.amzn2023.0.1.x86_64 235 kB/s |  31 kB     00:00
Apr 26 11:07:17 ip-172-31-18-56.ec2.internal cloud-init[1662]: (2/66): sssd-nfs-idmap-2.9.4-1.amzn2023.0.1.x86 2.1 MB/s |  35 kB     00:00
Apr 26 11:07:17 ip-172-31-18-56.ec2.internal cloud-init[1662]: (3/66): amazon-linux-repo-s3-2023.4.20240416-1. 1.0 MB/s |  16 kB     00:00
.
.
(中略)
.
.
Apr 26 11:07:19 ip-172-31-18-56.ec2.internal cloud-init[1662]: (64/66): yum-4.14.0-1.amzn2023.0.4.noarch.rpm   2.2 MB/s |  37 kB     00:00
Apr 26 11:07:19 ip-172-31-18-56.ec2.internal cloud-init[1662]: (65/66): util-linux-core-2.37.4-1.amzn2023.0.4. 9.1 MB/s | 432 kB     00:00
Apr 26 11:07:19 ip-172-31-18-56.ec2.internal cloud-init[1662]: (66/66): util-linux-2.37.4-1.amzn2023.0.4.x86_6  11 MB/s | 2.2 MB     00:00
Apr 26 11:07:19 ip-172-31-18-56.ec2.internal cloud-init[1662]: --------------------------------------------------------------------------------
Apr 26 11:07:19 ip-172-31-18-56.ec2.internal cloud-init[1662]: Total                                            38 MB/s | 106 MB     00:02
Apr 26 11:07:22 ip-172-31-18-56.ec2.internal cloud-init[1662]: Running transaction check
Apr 26 11:07:22 ip-172-31-18-56.ec2.internal cloud-init[1662]: Transaction check succeeded.
Apr 26 11:07:22 ip-172-31-18-56.ec2.internal cloud-init[1662]: Running transaction test
Apr 26 11:07:23 ip-172-31-18-56.ec2.internal systemd[1]: systemd-hostnamed.service: Deactivated successfully.
░░ Subject: Unit succeeded
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
░░
░░ The unit systemd-hostnamed.service has successfully entered the 'dead' state.
Apr 26 11:07:23 ip-172-31-18-56.ec2.internal audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=systemd-hostnamed comm="systemd" exe="/usr/lib/>
Apr 26 11:07:23 ip-172-31-18-56.ec2.internal audit: BPF prog-id=33 op=UNLOAD
Apr 26 11:07:23 ip-172-31-18-56.ec2.internal audit: BPF prog-id=32 op=UNLOAD
Apr 26 11:07:23 ip-172-31-18-56.ec2.internal audit: BPF prog-id=31 op=UNLOAD
Apr 26 11:07:23 ip-172-31-18-56.ec2.internal amazon-ssm-agent[1612]: 2024-04-26 11:07:23 INFO [CredentialRefresher] Sending credential refresher stop signal
Apr 26 11:07:23 ip-172-31-18-56.ec2.internal amazon-ssm-agent[1612]: 2024-04-26 11:07:23 INFO [Registrar] Registrar is already stopped
Apr 26 11:07:23 ip-172-31-18-56.ec2.internal amazon-ssm-agent[1612]: 2024-04-26 11:07:23 INFO [amazon-ssm-agent] Bye.
Apr 26 11:07:23 ip-172-31-18-56.ec2.internal amazon-ssm-agent[1612]: 2024-04-26 11:07:23 INFO [CredentialRefresher] Stopping credentials refresher
Apr 26 11:07:23 ip-172-31-18-56.ec2.internal audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=amazon-ssm-agent comm="systemd" exe="/usr/lib/s>
Apr 26 11:07:23 ip-172-31-18-56.ec2.internal systemd[1]: amazon-ssm-agent.service: Deactivated successfully.
░░ Subject: Unit succeeded
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
░░
░░ The unit amazon-ssm-agent.service has successfully entered the 'dead' state.
Apr 26 11:07:23 ip-172-31-18-56.ec2.internal systemd[1]: amazon-ssm-agent.service: Unit process 1682 (ssm-document-wo) remains running after unit stopped.
Apr 26 11:07:23 ip-172-31-18-56.ec2.internal systemd[1]: amazon-ssm-agent.service: Unit process 1688 (ssm-document-wo) remains running after unit stopped.
Apr 26 11:07:23 ip-172-31-18-56.ec2.internal systemd[1]: amazon-ssm-agent.service: Unit process 1704 (_script.sh) remains running after unit stopped.
Apr 26 11:07:23 ip-172-31-18-56.ec2.internal systemd[1]: amazon-ssm-agent.service: Unit process 1711 (sleep) remains running after unit stopped.
Apr 26 11:07:23 ip-172-31-18-56.ec2.internal systemd[1]: amazon-ssm-agent.service: Unit process 1712 (updater) remains running after unit stopped.
Apr 26 11:07:23 ip-172-31-18-56.ec2.internal systemd[1]: amazon-ssm-agent.service: Unit process 1722 (install.sh) remains running after unit stopped.
Apr 26 11:07:23 ip-172-31-18-56.ec2.internal systemd[1]: amazon-ssm-agent.service: Unit process 1734 (systemctl) remains running after unit stopped.
Apr 26 11:07:23 ip-172-31-18-56.ec2.internal systemd[1]: Stopped amazon-ssm-agent.service - amazon-ssm-agent.
░░ Subject: A stop job for unit amazon-ssm-agent.service has finished
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
░░
░░ A stop job for unit amazon-ssm-agent.service has finished.
░░
░░ The job identifier is 663 and the job result is done.
Apr 26 11:07:23 ip-172-31-18-56.ec2.internal systemd[1]: amazon-ssm-agent.service: Consumed 2.254s CPU time.
░░ Subject: Resources consumed by unit runtime
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
░░
░░ The unit amazon-ssm-agent.service completed and consumed the indicated resources.
Apr 26 11:07:23 ip-172-31-18-56.ec2.internal systemd[1]: Reloading.
Apr 26 11:07:23 ip-172-31-18-56.ec2.internal zram_generator::config[1826]: zram0: system has too much memory (905MB), limit is 800MB, ignoring.
Apr 26 11:07:24 ip-172-31-18-56.ec2.internal systemd[1]: /usr/lib/systemd/system/acpid.socket:6: ListenStream= references a path below legacy directory /var/run/, updating /var/run/acpid.socket → /run/>
Apr 26 11:07:24 ip-172-31-18-56.ec2.internal audit: BPF prog-id=35 op=LOAD
Apr 26 11:07:24 ip-172-31-18-56.ec2.internal audit: BPF prog-id=28 op=UNLOAD
Apr 26 11:07:24 ip-172-31-18-56.ec2.internal audit: BPF prog-id=36 op=LOAD
Apr 26 11:07:24 ip-172-31-18-56.ec2.internal audit: BPF prog-id=37 op=LOAD
Apr 26 11:07:24 ip-172-31-18-56.ec2.internal audit: BPF prog-id=29 op=UNLOAD
Apr 26 11:07:24 ip-172-31-18-56.ec2.internal audit: BPF prog-id=30 op=UNLOAD
Apr 26 11:07:24 ip-172-31-18-56.ec2.internal audit: BPF prog-id=38 op=LOAD
Apr 26 11:07:24 ip-172-31-18-56.ec2.internal audit: BPF prog-id=19 op=UNLOAD
Apr 26 11:07:24 ip-172-31-18-56.ec2.internal audit: BPF prog-id=39 op=LOAD
Apr 26 11:07:24 ip-172-31-18-56.ec2.internal audit: BPF prog-id=26 op=UNLOAD
Apr 26 11:07:24 ip-172-31-18-56.ec2.internal audit: BPF prog-id=40 op=LOAD
Apr 26 11:07:24 ip-172-31-18-56.ec2.internal audit: BPF prog-id=34 op=UNLOAD
Apr 26 11:07:24 ip-172-31-18-56.ec2.internal audit: BPF prog-id=41 op=LOAD
Apr 26 11:07:24 ip-172-31-18-56.ec2.internal audit: BPF prog-id=42 op=LOAD
Apr 26 11:07:24 ip-172-31-18-56.ec2.internal audit: BPF prog-id=20 op=UNLOAD
Apr 26 11:07:24 ip-172-31-18-56.ec2.internal audit: BPF prog-id=21 op=UNLOAD
Apr 26 11:07:24 ip-172-31-18-56.ec2.internal audit: BPF prog-id=43 op=LOAD
Apr 26 11:07:24 ip-172-31-18-56.ec2.internal audit: BPF prog-id=25 op=UNLOAD
Apr 26 11:07:24 ip-172-31-18-56.ec2.internal audit: BPF prog-id=44 op=LOAD
Apr 26 11:07:24 ip-172-31-18-56.ec2.internal audit: BPF prog-id=22 op=UNLOAD
Apr 26 11:07:24 ip-172-31-18-56.ec2.internal audit: BPF prog-id=45 op=LOAD
Apr 26 11:07:24 ip-172-31-18-56.ec2.internal audit: BPF prog-id=46 op=LOAD
Apr 26 11:07:24 ip-172-31-18-56.ec2.internal audit: BPF prog-id=23 op=UNLOAD
Apr 26 11:07:24 ip-172-31-18-56.ec2.internal audit: BPF prog-id=24 op=UNLOAD
Apr 26 11:07:24 ip-172-31-18-56.ec2.internal audit: BPF prog-id=47 op=LOAD
Apr 26 11:07:24 ip-172-31-18-56.ec2.internal audit: BPF prog-id=27 op=UNLOAD
Apr 26 11:07:24 ip-172-31-18-56.ec2.internal systemd[1]: Reloading.
Apr 26 11:07:24 ip-172-31-18-56.ec2.internal zram_generator::config[1861]: zram0: system has too much memory (905MB), limit is 800MB, ignoring.
Apr 26 11:07:24 ip-172-31-18-56.ec2.internal cloud-init[1662]: Transaction test succeeded.
Apr 26 11:07:24 ip-172-31-18-56.ec2.internal cloud-init[1662]: Running transaction
Apr 26 11:07:24 ip-172-31-18-56.ec2.internal systemd[1]: /usr/lib/systemd/system/acpid.socket:6: ListenStream= references a path below legacy directory /var/run/, updating /var/run/acpid.socket → /run/>
Apr 26 11:07:24 ip-172-31-18-56.ec2.internal audit: BPF prog-id=48 op=LOAD
Apr 26 11:07:24 ip-172-31-18-56.ec2.internal audit: BPF prog-id=35 op=UNLOAD
Apr 26 11:07:24 ip-172-31-18-56.ec2.internal audit: BPF prog-id=49 op=LOAD
Apr 26 11:07:24 ip-172-31-18-56.ec2.internal audit: BPF prog-id=50 op=LOAD
Apr 26 11:07:24 ip-172-31-18-56.ec2.internal audit: BPF prog-id=36 op=UNLOAD
Apr 26 11:07:24 ip-172-31-18-56.ec2.internal audit: BPF prog-id=37 op=UNLOAD
Apr 26 11:07:24 ip-172-31-18-56.ec2.internal audit: BPF prog-id=51 op=LOAD
Apr 26 11:07:24 ip-172-31-18-56.ec2.internal audit: BPF prog-id=38 op=UNLOAD
Apr 26 11:07:24 ip-172-31-18-56.ec2.internal audit: BPF prog-id=52 op=LOAD
Apr 26 11:07:24 ip-172-31-18-56.ec2.internal audit: BPF prog-id=39 op=UNLOAD
Apr 26 11:07:24 ip-172-31-18-56.ec2.internal audit: BPF prog-id=53 op=LOAD
Apr 26 11:07:24 ip-172-31-18-56.ec2.internal audit: BPF prog-id=40 op=UNLOAD
Apr 26 11:07:24 ip-172-31-18-56.ec2.internal audit: BPF prog-id=54 op=LOAD
Apr 26 11:07:24 ip-172-31-18-56.ec2.internal audit: BPF prog-id=55 op=LOAD
Apr 26 11:07:24 ip-172-31-18-56.ec2.internal audit: BPF prog-id=41 op=UNLOAD
Apr 26 11:07:24 ip-172-31-18-56.ec2.internal audit: BPF prog-id=42 op=UNLOAD
Apr 26 11:07:24 ip-172-31-18-56.ec2.internal audit: BPF prog-id=56 op=LOAD
Apr 26 11:07:24 ip-172-31-18-56.ec2.internal audit: BPF prog-id=43 op=UNLOAD
Apr 26 11:07:24 ip-172-31-18-56.ec2.internal audit: BPF prog-id=57 op=LOAD
Apr 26 11:07:24 ip-172-31-18-56.ec2.internal audit: BPF prog-id=44 op=UNLOAD
Apr 26 11:07:24 ip-172-31-18-56.ec2.internal audit: BPF prog-id=58 op=LOAD
Apr 26 11:07:24 ip-172-31-18-56.ec2.internal audit: BPF prog-id=59 op=LOAD
Apr 26 11:07:24 ip-172-31-18-56.ec2.internal audit: BPF prog-id=45 op=UNLOAD
Apr 26 11:07:24 ip-172-31-18-56.ec2.internal audit: BPF prog-id=46 op=UNLOAD
Apr 26 11:07:24 ip-172-31-18-56.ec2.internal audit: BPF prog-id=60 op=LOAD
Apr 26 11:07:24 ip-172-31-18-56.ec2.internal audit: BPF prog-id=47 op=UNLOAD
Apr 26 11:07:25 ip-172-31-18-56.ec2.internal cloud-init[1662]: RPM: error: can't create transaction lock on /var/lib/rpm/.rpm.lock (Resource temporarily unavailable)
Apr 26 11:07:25 ip-172-31-18-56.ec2.internal cloud-init[1662]: The downloaded packages were saved in cache until the next successful transaction.
Apr 26 11:07:25 ip-172-31-18-56.ec2.internal cloud-init[1662]: You can remove cached packages by executing 'dnf clean packages'.
Apr 26 11:07:25 ip-172-31-18-56.ec2.internal cloud-init[1662]: Error: Could not run transaction.
Apr 26 11:07:25 ip-172-31-18-56.ec2.internal cloud-init[1662]: 2024-04-26 11:07:25,849 - cc_scripts_user.py[WARNING]: Failed to run module scripts-user (scripts in /var/lib/cloud/instance/scripts)
Apr 26 11:07:25 ip-172-31-18-56.ec2.internal cloud-init[1662]: 2024-04-26 11:07:25,849 - util.py[WARNING]: Running module scripts-user (<module 'cloudinit.config.cc_scripts_user' from '/usr/lib/python3>
Apr 26 11:07:25 ip-172-31-18-56.ec2.internal cloud-init[1869]: #############################################################
Apr 26 11:07:25 ip-172-31-18-56.ec2.internal cloud-init[1871]: -----BEGIN SSH HOST KEY FINGERPRINTS-----
Apr 26 11:07:25 ip-172-31-18-56.ec2.internal cloud-init[1874]: 256 SHA256:CBlTx4OrbcA7UqyFqiC1+HK8Hqm19e8Xtgzbe2qadb8 root@ip-172-31-18-56.ec2.internal (ECDSA)
Apr 26 11:07:25 ip-172-31-18-56.ec2.internal cloud-init[1877]: 256 SHA256:E38f4fls31GBZpPfW2ZkwSN0f87lmjzwIFGp6Fx5Rhc root@ip-172-31-18-56.ec2.internal (ED25519)
Apr 26 11:07:25 ip-172-31-18-56.ec2.internal cloud-init[1878]: -----END SSH HOST KEY FINGERPRINTS-----
Apr 26 11:07:25 ip-172-31-18-56.ec2.internal cloud-init[1879]: #############################################################
Apr 26 11:07:25 ip-172-31-18-56.ec2.internal cloud-init[1662]: Cloud-init v. 22.2.2 finished at Fri, 26 Apr 2024 11:07:25 +0000. Datasource DataSourceEc2.  Up 42.62 seconds
Apr 26 11:07:26 ip-172-31-18-56.ec2.internal audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=cloud-final comm="systemd" exe="/usr/lib/syste>
Apr 26 11:07:26 ip-172-31-18-56.ec2.internal systemd[1]: cloud-final.service: Main process exited, code=exited, status=1/FAILURE
░░ Subject: Unit process exited
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
░░
░░ An ExecStart= process belonging to unit cloud-final.service has exited.
░░
░░ The process' exit code is 'exited' and its exit status is 1.
Apr 26 11:07:26 ip-172-31-18-56.ec2.internal systemd[1]: cloud-final.service: Failed with result 'exit-code'.
░░ Subject: Unit failed
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
░░
░░ The unit cloud-final.service has entered the 'failed' state with result 'exit-code'.
Apr 26 11:07:26 ip-172-31-18-56.ec2.internal systemd[1]: cloud-final.service: Unit process 1662 (tee) remains running after unit stopped.
Apr 26 11:07:26 ip-172-31-18-56.ec2.internal systemd[1]: cloud-final.service: Unit process 1882 (cloud-init) remains running after unit stopped.
Apr 26 11:07:26 ip-172-31-18-56.ec2.internal systemd[1]: Failed to start cloud-final.service - Execute cloud user/final scripts.
░░ Subject: A start job for unit cloud-final.service has failed
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
░░
░░ A start job for unit cloud-final.service has finished with a failure.
░░
░░ The job identifier is 227 and the job result is failed.
Apr 26 11:07:26 ip-172-31-18-56.ec2.internal systemd[1]: cloud-final.service: Consumed 17.092s CPU time.
░░ Subject: Resources consumed by unit runtime
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
░░
░░ The unit cloud-final.service completed and consumed the indicated resources.
Apr 26 11:07:26 ip-172-31-18-56.ec2.internal audit: BPF prog-id=61 op=LOAD
Apr 26 11:07:26 ip-172-31-18-56.ec2.internal systemd[1]: Starting update-motd.service - Dynamically Generate Message Of The Day...
░░ Subject: A start job for unit update-motd.service has begun execution
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
░░
░░ A start job for unit update-motd.service has begun execution.
░░
░░ The job identifier is 238.
Apr 26 11:07:29 ip-172-31-18-56.ec2.internal systemd[1]: Reloading.
Apr 26 11:07:29 ip-172-31-18-56.ec2.internal zram_generator::config[1926]: zram0: system has too much memory (905MB), limit is 800MB, ignoring.
Apr 26 11:07:29 ip-172-31-18-56.ec2.internal systemd[1]: /usr/lib/systemd/system/acpid.socket:6: ListenStream= references a path below legacy directory /var/run/, updating /var/run/acpid.socket → /run/>
Apr 26 11:07:30 ip-172-31-18-56.ec2.internal audit: BPF prog-id=62 op=LOAD
Apr 26 11:07:30 ip-172-31-18-56.ec2.internal audit: BPF prog-id=48 op=UNLOAD
Apr 26 11:07:30 ip-172-31-18-56.ec2.internal audit: BPF prog-id=63 op=LOAD
Apr 26 11:07:30 ip-172-31-18-56.ec2.internal audit: BPF prog-id=64 op=LOAD
Apr 26 11:07:30 ip-172-31-18-56.ec2.internal audit: BPF prog-id=49 op=UNLOAD
Apr 26 11:07:30 ip-172-31-18-56.ec2.internal audit: BPF prog-id=50 op=UNLOAD
Apr 26 11:07:30 ip-172-31-18-56.ec2.internal audit: BPF prog-id=65 op=LOAD
Apr 26 11:07:30 ip-172-31-18-56.ec2.internal audit: BPF prog-id=51 op=UNLOAD
Apr 26 11:07:30 ip-172-31-18-56.ec2.internal audit: BPF prog-id=66 op=LOAD
Apr 26 11:07:30 ip-172-31-18-56.ec2.internal audit: BPF prog-id=52 op=UNLOAD
Apr 26 11:07:30 ip-172-31-18-56.ec2.internal audit: BPF prog-id=67 op=LOAD
Apr 26 11:07:30 ip-172-31-18-56.ec2.internal audit: BPF prog-id=61 op=UNLOAD
Apr 26 11:07:30 ip-172-31-18-56.ec2.internal audit: BPF prog-id=68 op=LOAD
Apr 26 11:07:30 ip-172-31-18-56.ec2.internal audit: BPF prog-id=53 op=UNLOAD
Apr 26 11:07:30 ip-172-31-18-56.ec2.internal audit: BPF prog-id=69 op=LOAD
Apr 26 11:07:30 ip-172-31-18-56.ec2.internal audit: BPF prog-id=70 op=LOAD
Apr 26 11:07:30 ip-172-31-18-56.ec2.internal audit: BPF prog-id=54 op=UNLOAD
Apr 26 11:07:30 ip-172-31-18-56.ec2.internal audit: BPF prog-id=55 op=UNLOAD
Apr 26 11:07:30 ip-172-31-18-56.ec2.internal audit: BPF prog-id=71 op=LOAD
Apr 26 11:07:30 ip-172-31-18-56.ec2.internal audit: BPF prog-id=56 op=UNLOAD
Apr 26 11:07:30 ip-172-31-18-56.ec2.internal audit: BPF prog-id=72 op=LOAD
Apr 26 11:07:30 ip-172-31-18-56.ec2.internal audit: BPF prog-id=57 op=UNLOAD
Apr 26 11:07:30 ip-172-31-18-56.ec2.internal audit: BPF prog-id=73 op=LOAD
Apr 26 11:07:30 ip-172-31-18-56.ec2.internal audit: BPF prog-id=74 op=LOAD
Apr 26 11:07:30 ip-172-31-18-56.ec2.internal audit: BPF prog-id=58 op=UNLOAD
Apr 26 11:07:30 ip-172-31-18-56.ec2.internal audit: BPF prog-id=59 op=UNLOAD
Apr 26 11:07:30 ip-172-31-18-56.ec2.internal audit: BPF prog-id=75 op=LOAD
Apr 26 11:07:30 ip-172-31-18-56.ec2.internal audit: BPF prog-id=60 op=UNLOAD
Apr 26 11:07:30 ip-172-31-18-56.ec2.internal systemd[1]: amazon-ssm-agent.service: Found left-over process 1688 (ssm-document-wo) in control group while starting unit. Ignoring.
Apr 26 11:07:30 ip-172-31-18-56.ec2.internal systemd[1]: This usually indicates unclean termination of a previous run, or service implementation deficiencies.

Transaction test succeeded.前後で出力されているログは同様のものであり、トランザクションロックできない原因になるものは見つけられませんでした。

ということでログから根本原因は不明です。

緩和策

考えられる緩和策

根本原因が不明な以上、回避策を取るのは難しいです。緩和策になります。

以降考えられる緩和策を紹介します。

  1. ユーザーデータ内で sleep 処理を入れて、dnfコマンドの実行を遅らせる
  2. ユーザーデータの中でdnfコマンドが失敗したらリトライ処理を組み込む
  3. (CloudFormation限定) cfn-signalで異常終了を検出し、スタックロールバック後に再度スタックをデプロイする
  4. パッケージの更新やインストールをしたAMIを作成し、そのAMIを使ってEC2インスタンスを起動する

1. ユーザーデータ内で sleep 処理を入れて、dnfコマンドの実行を遅らせる

まず第一に思いつくのは「ユーザーデータ内で sleep 処理を入れて、dnfコマンドの実行を遅らせる」でしょう。

ただし、これは私の経験上正常に動作しません。sleepを60秒など長く設定しても失敗する時は失敗します。

GitHubのIssueにも、sleepを30秒設定しても動作しなかったとコメントありました。

Any update for this issue? I put in a hack with a command 'sleep 30', and it worked before. Now this hac

[Bug] - SSM Auto Update conflicts with cloud-init package install (e.g. userData Docker installation fails on EC2. [Errno 2] No such file or directory) · Issue #397 · amazonlinux/amazon-linux-2023

実際にsleepを60秒にして試しましたが、以下のように失敗しました。

$ sudo cat /var/log/cloud-init-output.log
Cloud-init v. 22.2.2 running 'init' at Sat, 27 Apr 2024 07:21:46 +0000. Up 8.30 seconds.
ci-info: ++++++++++++++++++++++++++++++++++++++Net device info+++++++++++++++++++++++++++++++++++++++
ci-info: +--------+------+-----------------------------+---------------+--------+-------------------+
.
.
(中略)
.
.
Cloud-init v. 22.2.2 running 'modules:config' at Sat, 27 Apr 2024 07:21:50 +0000. Up 12.09 seconds.
Cloud-init v. 22.2.2 running 'modules:final' at Sat, 27 Apr 2024 07:21:51 +0000. Up 13.27 seconds.
+ sleep 60
+ dnf upgrade -y --releasever=latest
Amazon Linux 2023 repository                     43 MB/s |  23 MB     00:00
Amazon Linux 2023 Kernel Livepatch repository   852 kB/s | 165 kB     00:00
Dependencies resolved.
================================================================================
 Package                    Arch   Version                    Repository   Size
================================================================================
Installing:
 kernel                     x86_64 6.1.84-99.169.amzn2023     amazonlinux  31 M
Upgrading:
 amazon-linux-repo-s3       noarch 2023.4.20240416-1.amzn2023 amazonlinux  16 k
 amazon-ssm-agent           x86_64 3.3.131.0-1.amzn2023       amazonlinux  24 M
.
.
(中略)
.
.
(65/66): yum-4.14.0-1.amzn2023.0.4.noarch.rpm   1.7 MB/s |  37 kB     00:00
(66/66): util-linux-2.37.4-1.amzn2023.0.4.x86_6  36 MB/s | 2.2 MB     00:00
--------------------------------------------------------------------------------
Total                                            51 MB/s | 106 MB     00:02
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
RPM: error: can't create transaction lock on /var/lib/rpm/.rpm.lock (Resource temporarily unavailable)
The downloaded packages were saved in cache until the next successful transaction.
You can remove cached packages by executing 'dnf clean packages'.
Error: Could not run transaction.
2024-04-27 07:23:09,611 - cc_scripts_user.py[WARNING]: Failed to run module scripts-user (scripts in /var/lib/cloud/instance/scripts)
2024-04-27 07:23:09,611 - util.py[WARNING]: Running module scripts-user (<module 'cloudinit.config.cc_scripts_user' from '/usr/lib/python3.9/site-packages/cloudinit/config/cc_scripts_user.py'>) failed
Cloud-init v. 22.2.2 finished at Sat, 27 Apr 2024 07:23:09 +0000. Datasource DataSourceEc2.  Up 91.39 seconds

2. ユーザーデータの中でdnfコマンドが失敗したらリトライ処理を組み込む

次に思いつくのは「ユーザーデータの中でdnfコマンドが失敗したらリトライ処理を組み込む」でしょう。

以下のように引数で渡されたコマンドを最大リトライ回数までリトライする関数を用意しました。

#!/bin/bash

# -x to display the command to be executed
set -xe

# 引数で指定したコマンドをリトライする関数
retry_command() {
    local retries=0     # リトライ回数のカウンター
    local max_retries=5 # リトライ回数の上限
    local sleep_time=5  # sleepする秒数
    local cmd="$1"      # 実行したいコマンド

    # 実行したコマンドが失敗した場合、最大リトライ回数までリトライする
    while ! ${cmd}; do
        retries=$((retries + 1))
        if [[ "${retries}" > "${max_retries}" ]]; then
            echo "Maximum retry count ($max_retries) exceeded. Command execution failed."
            return 1
        fi
        echo "Command execution failed. Retrying attempt ${retries}..."
        sleep ${sleep_time}
    done

    echo "Command executed successfully."
    return 0
}

# リトライ関数を実行
retry_command "dnf upgrade -y --releasever=latest"

実行結果は以下のとおりです。

$ sudo cat /var/log/cloud-init-output.log
Cloud-init v. 22.2.2 running 'init' at Sat, 27 Apr 2024 07:50:28 +0000. Up 7.38 seconds.
.
.
(中略)
.
.
Cloud-init v. 22.2.2 running 'modules:final' at Sat, 27 Apr 2024 07:50:32 +0000. Up 11.38 seconds.
+ retry_command 'dnf upgrade -y --releasever=latest'
+ local retries=0
+ local max_retries=5
+ local sleep_time=5
+ local 'cmd=dnf upgrade -y --releasever=latest'
+ dnf upgrade -y --releasever=latest
Amazon Linux 2023 repository                     32 MB/s |  23 MB     00:00
Amazon Linux 2023 Kernel Livepatch repository   108 kB/s | 165 kB     00:01
Dependencies resolved.
================================================================================
 Package                    Arch   Version                    Repository   Size
================================================================================
Installing:
 kernel                     x86_64 6.1.84-99.169.amzn2023     amazonlinux  31 M
Upgrading:
 amazon-linux-repo-s3       noarch 2023.4.20240416-1.amzn2023 amazonlinux  16 k
 amazon-ssm-agent           x86_64 3.3.131.0-1.amzn2023       amazonlinux  24 M
.
.
(中略)
.
.
(65/66): yum-4.14.0-1.amzn2023.0.4.noarch.rpm   1.2 MB/s |  37 kB     00:00
(66/66): util-linux-2.37.4-1.amzn2023.0.4.x86_6  27 MB/s | 2.2 MB     00:00
--------------------------------------------------------------------------------
Total                                            47 MB/s | 106 MB     00:02
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
RPM: error: can't create transaction lock on /var/lib/rpm/.rpm.lock (Resource temporarily unavailable)
The downloaded packages were saved in cache until the next successful transaction.
You can remove cached packages by executing 'dnf clean packages'.
Error: Could not run transaction.
+ retries=1
+ [[ 1 > 5 ]]
+ echo 'Command execution failed. Retrying attempt 1...'
Command execution failed. Retrying attempt 1...
+ sleep 5
+ dnf upgrade -y --releasever=latest
Last metadata expiration check: 0:00:16 ago on Sat Apr 27 07:50:50 2024.
Dependencies resolved.
================================================================================
 Package                    Arch   Version                    Repository   Size
================================================================================
Installing:
 kernel                     x86_64 6.1.84-99.169.amzn2023     amazonlinux  31 M
Upgrading:
 amazon-linux-repo-s3       noarch 2023.4.20240416-1.amzn2023 amazonlinux  16 k
 c-ares                     x86_64 1.19.0-1.amzn2023.0.1      amazonlinux 110 k
.
.
(中略)
.
.
 util-linux-core            x86_64 2.37.4-1.amzn2023.0.4      amazonlinux 432 k
 yum                        noarch 4.14.0-1.amzn2023.0.4      amazonlinux  37 k
Installing dependencies:
 libsss_sudo                x86_64 2.9.4-1.amzn2023.0.1       amazonlinux  31 k
 python3-systemd            x86_64 235-51.amzn2023.0.2        amazonlinux  91 k
 sssd-nfs-idmap             x86_64 2.9.4-1.amzn2023.0.1       amazonlinux  35 k

Transaction Summary
================================================================================
Install   4 Packages
Upgrade  61 Packages

Total size: 82 M
Downloading Packages:
[SKIPPED] kernel-6.1.84-99.169.amzn2023.x86_64.rpm: Already downloaded
[SKIPPED] libsss_sudo-2.9.4-1.amzn2023.0.1.x86_64.rpm: Already downloaded
.
.
(中略)
.
.
[SKIPPED] util-linux-core-2.37.4-1.amzn2023.0.4.x86_64.rpm: Already downloaded
[SKIPPED] yum-4.14.0-1.amzn2023.0.4.noarch.rpm: Already downloaded
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
RPM: error: can't create transaction lock on /var/lib/rpm/.rpm.lock (Resource temporarily unavailable)
The downloaded packages were saved in cache until the next successful transaction.
You can remove cached packages by executing 'dnf clean packages'.
Error: Could not run transaction.
+ retries=2
+ [[ 2 > 5 ]]
+ echo 'Command execution failed. Retrying attempt 2...'
Command execution failed. Retrying attempt 2...
+ sleep 5
+ dnf upgrade -y --releasever=latest
Last metadata expiration check: 0:00:26 ago on Sat Apr 27 07:50:50 2024.
Dependencies resolved.
================================================================================
 Package                    Arch   Version                    Repository   Size
================================================================================
Installing:
 kernel                     x86_64 6.1.84-99.169.amzn2023     amazonlinux  31 M
Upgrading:
 amazon-linux-repo-s3       noarch 2023.4.20240416-1.amzn2023 amazonlinux  16 k
 c-ares                     x86_64 1.19.0-1.amzn2023.0.1      amazonlinux 110 k
.
.
(中略)
.
.
[SKIPPED] util-linux-2.37.4-1.amzn2023.0.4.x86_64.rpm: Already downloaded
[SKIPPED] util-linux-core-2.37.4-1.amzn2023.0.4.x86_64.rpm: Already downloaded
[SKIPPED] yum-4.14.0-1.amzn2023.0.4.noarch.rpm: Already downloaded
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Running scriptlet: selinux-policy-targeted-37.22-1.amzn2023.0.2.noarch    1/1
  Preparing        :                                                        1/1
.
.
(中略)
.
.

  Verifying        : yum-4.14.0-1.amzn2023.0.4.noarch                   125/126
  Verifying        : yum-4.12.0-2.amzn2023.0.4.noarch                   126/126

Upgraded:
  amazon-linux-repo-s3-2023.4.20240416-1.amzn2023.noarch
  c-ares-1.19.0-1.amzn2023.0.1.x86_64
.
.
(中略)
.
.
  util-linux-core-2.37.4-1.amzn2023.0.4.x86_64
  yum-4.14.0-1.amzn2023.0.4.noarch
Installed:
  kernel-6.1.84-99.169.amzn2023.x86_64
  libsss_sudo-2.9.4-1.amzn2023.0.1.x86_64
  python3-systemd-235-51.amzn2023.0.2.x86_64
  sssd-nfs-idmap-2.9.4-1.amzn2023.0.1.x86_64

Complete!
+ echo 'Command executed successfully.'
Command executed successfully.
+ return 0
Cloud-init v. 22.2.2 finished at Sat, 27 Apr 2024 07:52:05 +0000. Datasource DataSourceEc2.  Up 103.28 seconds

2回目のリトライで正常にインストールできました。数回リトライできるように組んでおくと良さそうですね。

せっかくなのでリトライ処理中にrpmの操作をしているプロセスを確認してみます。

以下のようにリトライ時にプロセスを確認するようなユーザーデータを指定してEC2インスタンスを起動します。

#!/bin/bash

# -x to display the command to be executed
set -xe

# 引数で指定したコマンドをリトライする関数
retry_command() {
    declare -r max_retries=5 # リトライ回数の上限
    declare -r sleep_time=5  # sleepする秒数
    local retries=0     # リトライ回数のカウンター
    local cmd="$1"      # 実行したいコマンド

    # 実行したコマンドが失敗した場合、最大リトライ回数までリトライする
    while ! ${cmd}; do
        
        ls -a /var/lib/rpm/
        file /var/lib/rpm/.rpm.lock
        ps auxfe
        ps -ef | grep rpm

        retries=$((retries + 1))
        if [[ "${retries}" > "${max_retries}" ]]; then
            echo "Maximum retry count ($max_retries) exceeded. Command execution failed."
            return 1
        fi
        echo "Command execution failed. Retrying attempt ${retries}..."
        sleep ${sleep_time}
    done

    echo "Command executed successfully."
    return 0
}

# リトライ関数を実行
retry_command "dnf upgrade -y --releasever=latest"

ログは以下のとおりです。

$ sudo cat /var/log/cloud-init-output.log
Cloud-init v. 22.2.2 running 'init' at Sat, 27 Apr 2024 13:22:42 +0000. Up 8.88 seconds.
.
.
(中略)
.
.

Cloud-init v. 22.2.2 running 'modules:final' at Sat, 27 Apr 2024 13:22:46 +0000. Up 13.53 seconds.
+ retry_command 'dnf upgrade -y --releasever=latest'
+ declare -r max_retries=5
+ declare -r sleep_time=5
+ local retries=0
+ local 'cmd=dnf upgrade -y --releasever=latest'
+ dnf upgrade -y --releasever=latest
Amazon Linux 2023 repository                     30 MB/s |  23 MB     00:00
Amazon Linux 2023 Kernel Livepatch repository   399 kB/s | 165 kB     00:00
Dependencies resolved.
================================================================================
 Package                    Arch   Version                    Repository   Size
================================================================================
Installing:
 kernel                     x86_64 6.1.84-99.169.amzn2023     amazonlinux  31 M
Upgrading:
 amazon-linux-repo-s3       noarch 2023.4.20240416-1.amzn2023 amazonlinux  16 k
.
.
(中略)
.
.
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
RPM: error: can't create transaction lock on /var/lib/rpm/.rpm.lock (Resource temporarily unavailable)
The downloaded packages were saved in cache until the next successful transaction.
You can remove cached packages by executing 'dnf clean packages'.
Error: Could not run transaction.
+ ls -a /var/lib/rpm/
.
..
.rpm.lock
rpmdb.sqlite
rpmdb.sqlite-shm
rpmdb.sqlite-wal
+ file /var/lib/rpm/.rpm.lock
/var/lib/rpm/.rpm.lock: empty
+ ps auxfe
USER         PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root           2  0.0  0.0      0     0 ?        S    13:22   0:00 [kthreadd]
root           3  0.0  0.0      0     0 ?        I<   13:22   0:00  \_ [rcu_gp]
root           4  0.0  0.0      0     0 ?        I<   13:22   0:00  \_ [rcu_par_gp]
root           5  0.0  0.0      0     0 ?        I<   13:22   0:00  \_ [slub_flushwq]
root           6  0.0  0.0      0     0 ?        I<   13:22   0:00  \_ [netns]
root           7  0.0  0.0      0     0 ?        I    13:22   0:00  \_ [kworker/0:0-xfs-conv/nvme0n1p1]
root           8  0.0  0.0      0     0 ?        I<   13:22   0:00  \_ [kworker/0:0H-events_highpri]
root           9  0.0  0.0      0     0 ?        I    13:22   0:00  \_ [kworker/u4:0-xfs-cil/nvme0n1p1]
root          10  0.0  0.0      0     0 ?        I<   13:22   0:00  \_ [mm_percpu_wq]
root          11  0.0  0.0      0     0 ?        I    13:22   0:00  \_ [rcu_tasks_kthread]
root          12  0.0  0.0      0     0 ?        I    13:22   0:00  \_ [rcu_tasks_rude_kthread]
root          13  0.0  0.0      0     0 ?        I    13:22   0:00  \_ [rcu_tasks_trace_kthread]
root          14  0.0  0.0      0     0 ?        S    13:22   0:00  \_ [ksoftirqd/0]
root          15  0.0  0.0      0     0 ?        I    13:22   0:00  \_ [rcu_preempt]
root          16  0.0  0.0      0     0 ?        S    13:22   0:00  \_ [migration/0]
root          17  0.0  0.0      0     0 ?        I    13:22   0:00  \_ [kworker/0:1-xfs-buf/nvme0n1p1]
root          18  0.0  0.0      0     0 ?        S    13:22   0:00  \_ [cpuhp/0]
root          19  0.0  0.0      0     0 ?        S    13:22   0:00  \_ [cpuhp/1]
root          20  0.0  0.0      0     0 ?        S    13:22   0:00  \_ [migration/1]
root          21  0.0  0.0      0     0 ?        S    13:22   0:00  \_ [ksoftirqd/1]
root          22  0.0  0.0      0     0 ?        I    13:22   0:00  \_ [kworker/1:0-xfs-inodegc/nvme0n1p1]
root          23  0.0  0.0      0     0 ?        I<   13:22   0:00  \_ [kworker/1:0H-events_highpri]
root          25  0.3  0.0      0     0 ?        I    13:22   0:00  \_ [kworker/u4:1-flush-259:0]
root          26  0.0  0.0      0     0 ?        S    13:22   0:00  \_ [kdevtmpfs]
root          27  0.0  0.0      0     0 ?        I<   13:22   0:00  \_ [inet_frag_wq]
root          28  0.0  0.0      0     0 ?        S    13:22   0:00  \_ [kauditd]
root          29  0.0  0.0      0     0 ?        S    13:22   0:00  \_ [khungtaskd]
root          30  0.0  0.0      0     0 ?        S    13:22   0:00  \_ [oom_reaper]
root          31  0.0  0.0      0     0 ?        I    13:22   0:00  \_ [kworker/u4:2-xfs-cil/nvme0n1p1]
root          32  0.0  0.0      0     0 ?        I<   13:22   0:00  \_ [writeback]
root          33  0.0  0.0      0     0 ?        S    13:22   0:00  \_ [kcompactd0]
root          34  0.0  0.0      0     0 ?        SN   13:22   0:00  \_ [khugepaged]
root          35  0.0  0.0      0     0 ?        I<   13:22   0:00  \_ [kintegrityd]
root          36  0.0  0.0      0     0 ?        I<   13:22   0:00  \_ [kblockd]
root          37  0.0  0.0      0     0 ?        I<   13:22   0:00  \_ [blkcg_punt_bio]
root          38  0.0  0.0      0     0 ?        I    13:22   0:00  \_ [kworker/1:1-events]
root          39  0.0  0.0      0     0 ?        I<   13:22   0:00  \_ [tpm_dev_wq]
root          40  0.0  0.0      0     0 ?        I<   13:22   0:00  \_ [md]
root          41  0.0  0.0      0     0 ?        I<   13:22   0:00  \_ [edac-poller]
root          42  0.0  0.0      0     0 ?        S    13:22   0:00  \_ [watchdogd]
root          43  0.0  0.0      0     0 ?        I<   13:22   0:00  \_ [kworker/0:1H-xfs-log/nvme0n1p1]
root          66  0.0  0.0      0     0 ?        S    13:22   0:00  \_ [kswapd0]
root          67  0.0  0.0      0     0 ?        I<   13:22   0:00  \_ [xfsalloc]
root          70  0.0  0.0      0     0 ?        I<   13:22   0:00  \_ [xfs_mru_cache]
root          73  0.0  0.0      0     0 ?        I<   13:22   0:00  \_ [kthrotld]
root          76  0.0  0.0      0     0 ?        I    13:22   0:00  \_ [kworker/0:2-events]
root         120  0.0  0.0      0     0 ?        I<   13:22   0:00  \_ [nvme-wq]
root         122  0.0  0.0      0     0 ?        I<   13:22   0:00  \_ [nvme-reset-wq]
root         124  0.0  0.0      0     0 ?        I<   13:22   0:00  \_ [nvme-delete-wq]
root         130  0.0  0.0      0     0 ?        I    13:22   0:00  \_ [kworker/u4:3-flush-259:0]
root         131  0.0  0.0      0     0 ?        I<   13:22   0:00  \_ [mld]
root         132  0.0  0.0      0     0 ?        I    13:22   0:00  \_ [kworker/u4:4-events_unbound]
root         133  0.0  0.0      0     0 ?        I<   13:22   0:00  \_ [ipv6_addrconf]
root         153  0.0  0.0      0     0 ?        I    13:22   0:00  \_ [kworker/u4:5-writeback]
root         169  0.0  0.0      0     0 ?        I<   13:22   0:00  \_ [kstrp]
root         179  0.0  0.0      0     0 ?        I<   13:22   0:00  \_ [zswap-shrink]
root         180  0.0  0.0      0     0 ?        I<   13:22   0:00  \_ [kworker/u5:0]
root         235  0.0  0.0      0     0 ?        I    13:22   0:00  \_ [kworker/1:2-cgroup_destroy]
root         257  0.0  0.0      0     0 ?        I<   13:22   0:00  \_ [kworker/1:1H-xfs-log/nvme0n1p1]
root         717  0.0  0.0      0     0 ?        I<   13:22   0:00  \_ [xfs-buf/nvme0n1]
root         719  0.0  0.0      0     0 ?        I<   13:22   0:00  \_ [xfs-conv/nvme0n]
root         722  0.0  0.0      0     0 ?        I<   13:22   0:00  \_ [xfs-reclaim/nvm]
root         723  0.0  0.0      0     0 ?        I<   13:22   0:00  \_ [xfs-blockgc/nvm]
root         724  0.0  0.0      0     0 ?        I<   13:22   0:00  \_ [xfs-inodegc/nvm]
root         726  0.0  0.0      0     0 ?        I<   13:22   0:00  \_ [xfs-log/nvme0n1]
root         727  0.0  0.0      0     0 ?        I<   13:22   0:00  \_ [xfs-cil/nvme0n1]
root         728  0.0  0.0      0     0 ?        S    13:22   0:00  \_ [xfsaild/nvme0n1p1]
root         733  0.0  0.0      0     0 ?        I    13:22   0:00  \_ [kworker/1:3-rcu_gp]
root        1168  0.0  0.0      0     0 ?        I    13:22   0:00  \_ [kworker/1:4-events]
root        1188  0.0  0.0      0     0 ?        I    13:22   0:00  \_ [kworker/0:3-xfs-buf/nvme0n1p1]
root        1215  0.0  0.0      0     0 ?        I<   13:22   0:00  \_ [rpciod]
root        1216  0.0  0.0      0     0 ?        I<   13:22   0:00  \_ [xprtiod]
root        1273  0.0  0.0      0     0 ?        I<   13:22   0:00  \_ [cryptd]
root        1296  0.0  0.0      0     0 ?        I<   13:22   0:00  \_ [ena]
root           1  2.6  1.8 105392 16820 ?        Ss   13:22   0:01 /usr/lib/systemd/systemd --switched-root --system --deserialize=32 TERM=vt220 BOOT_IMAGE=(hd0,gpt1)/boot/vmlinuz-6.1.79-99.164.amzn2023.x86_64
root         775  0.5  1.2  34108 11724 ?        Ss   13:22   0:00 /usr/lib/systemd/systemd-journald LANG=C.UTF-8 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin NOTIFY_SOCKET=/run/systemd/notify LISTEN_PID=775 LISTEN_FDS=4 LISTEN_FDNAMES=systemd-journald-dev-log.socket:systemd-journald-audit.socket:systemd-journald.socket:systemd-journald.socket INVOCATION_ID=863579a1574a4c6d801abfa4c16cb312 RUNTIME_DIRECTORY=/run/systemd/journal SYSTEMD_EXEC_PID=775
root        1186  0.1  1.1  30596 10712 ?        Ss   13:22   0:00 /usr/lib/systemd/systemd-udevd LANG=C.UTF-8 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin NOTIFY_SOCKET=/run/systemd/notify LISTEN_PID=1186 LISTEN_FDS=2 LISTEN_FDNAMES=systemd-udevd-control.socket:systemd-udevd-kernel.socket INVOCATION_ID=627d5249b5f448c0a166268c3682aafd JOURNAL_STREAM=8:13444 SYSTEMD_EXEC_PID=1186
systemd+    1190  0.3  1.5  21204 14432 ?        Ss   13:22   0:00 /usr/lib/systemd/systemd-resolved LANG=C.UTF-8 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin NOTIFY_SOCKET=/run/systemd/notify LOGNAME=systemd-resolve USER=systemd-resolve INVOCATION_ID=410128edef5744bcb3ef35357716bb6e JOURNAL_STREAM=8:13511 RUNTIME_DIRECTORY=/run/systemd/resolve SYSTEMD_EXEC_PID=1190
root        1211  0.0  0.2  29260  2432 ?        S<sl 13:22   0:00 /sbin/auditd LANG=C.UTF-8 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin PIDFILE=/run/auditd.pid INVOCATION_ID=d921312bb0024dd99544edf5f91c7400 JOURNAL_STREAM=8:14500 SYSTEMD_EXEC_PID=1187
root        1418  0.0  0.6  15292  6480 ?        Ss   13:22   0:00 /usr/bin/systemd-inhibit --what=handle-suspend-key:handle-hibernate-key --who=noah --why=acpid instead --mode=block /usr/sbin/acpid -fLANG=C.UTF-8 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin INVOCATION_ID=679c314b7af24558b154b89801bdeaa3 SYSTEMD_EXEC_PID=1418 OPTIONS=
root        1466  0.0  0.1   2668  1132 ?        S    13:22   0:00  \_ /usr/sbin/acpid -f LANG=C.UTF-8 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin INVOCATION_ID=679c314b7af24558b154b89801bdeaa3 SYSTEMD_EXEC_PID=1418 OPTIONS=
root        1420  0.0  0.1  81344  1552 ?        Ssl  13:22   0:00 /usr/sbin/irqbalance --foreground LANG=C.UTF-8 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin INVOCATION_ID=e55e5897287d41269f6c9d9f6743e2b2 JOURNAL_STREAM=8:14862 RUNTIME_DIRECTORY=/run/irqbalance SYSTEMD_EXEC_PID=1420
libstor+    1421  0.0  0.2   2752  2036 ?        Ss   13:22   0:00 /usr/bin/lsmd -d LANG=C.UTF-8 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin HOME=/root LOGNAME=root USER=root SHELL=/bin/bashINVOCATION_ID=f9a483acf59c44e78d2f4bb259983691 JOURNAL_STREAM=8:15583 SYSTEMD_EXEC_PID=1421
root        1423 97.7  0.7 164928  6896 ?        Ssl  13:22   0:37 /usr/sbin/rngd -f -x pkcs11 -x nist LANG=C.UTF-8 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin INVOCATION_ID=c25c43ad1daa4e84be69801cc6b9aa72 JOURNAL_STREAM=8:14882 SYSTEMD_EXEC_PID=1423 RNGD_ARGS=-x pkcs11 -x nist
root        1424  0.1  1.1 240056 10264 ?        Ss   13:22   0:00 /usr/sbin/sssd -i --logger=files LANG=C.UTF-8 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin NOTIFY_SOCKET=/run/systemd/notifyPIDFILE=/run/sssd.pid INVOCATION_ID=78d3feb5201540bcbe0361f06c40d9d8 JOURNAL_STREAM=8:14888 SYSTEMD_EXEC_PID=1424 DEBUG_LOGGER=--logger=files
root        1448  0.6  1.3 243700 12508 ?        S    13:22   0:00  \_ /usr/libexec/sssd/sssd_be --domain implicit_files --uid 0 --gid 0 --logger=files LANG=C.UTF-8 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin NOTIFY_SOCKET=/run/systemd/notify PIDFILE=/run/sssd.pid INVOCATION_ID=78d3feb5201540bcbe0361f06c40d9d8 JOURNAL_STREAM=8:14888 SYSTEMD_EXEC_PID=1424 DEBUG_LOGGER=--logger=files _SSS_LOOPS=NO KRB5RCACHEDIR=/var/cache/krb5rcache
root        1449  0.3  4.2 267456 39080 ?        R    13:22   0:00  \_ /usr/libexec/sssd/sssd_nss --uid 0 --gid 0 --logger=files LANG=C.UTF-8 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin NOTIFY_SOCKET=/run/systemd/notify PIDFILE=/run/sssd.pid INVOCATION_ID=78d3feb5201540bcbe0361f06c40d9d8 JOURNAL_STREAM=8:14888 SYSTEMD_EXEC_PID=1424 DEBUG_LOGGER=--logger=files _SSS_LOOPS=NO KRB5RCACHEDIR=/var/cache/krb5rcache
root        1428  0.0  0.8  15632  7588 ?        Ss   13:22   0:00 /usr/lib/systemd/systemd-homed LANG=C.UTF-8 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin INVOCATION_ID=874d89e138b34fcab6a391a6908aed55 JOURNAL_STREAM=8:15590 STATE_DIRECTORY=/var/lib/systemd/home SYSTEMD_EXEC_PID=1428
dbus        1431  0.0  0.3   8372  3476 ?        Ss   13:22   0:00 /usr/bin/dbus-broker-launch --scope system --audit LANG=C.UTF-8 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin NOTIFY_SOCKET=/run/systemd/notify LISTEN_PID=1431 LISTEN_FDS=1 LISTEN_FDNAMES=dbus.socket SYSTEMD_NSS_DYNAMIC_BYPASS=1 INVOCATION_ID=0bd58a2a43f94a4092305de7f07c50db JOURNAL_STREAM=8:14904 SYSTEMD_EXEC_PID=1431
dbus        1437  0.1  0.3   5264  2840 ?        S    13:22   0:00  \_ dbus-broker --log 4 --controller 9 --machine-id ec22c82166c220293dd9e2defaa7755c --max-bytes 536870912 --max-fds 4096 --max-matches 16384 --audit LANG=C.UTF-8 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin NOTIFY_SOCKET=/run/systemd/notify SYSTEMD_NSS_DYNAMIC_BYPASS=1 INVOCATION_ID=0bd58a2a43f94a4092305de7f07c50db JOURNAL_STREAM=8:14904 SYSTEMD_EXEC_PID=1431
systemd+    1432  0.1  1.0 235888  9804 ?        Ss   13:22   0:00 /usr/lib/systemd/systemd-networkd LANG=C.UTF-8 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin NOTIFY_SOCKET=/run/systemd/notify LISTEN_PID=1432 LISTEN_FDS=1 LISTEN_FDNAMES=systemd-networkd.socket LOGNAME=systemd-network USER=systemd-network INVOCATION_ID=68ba8ab4689f4953a68115c38a4e9ca3 JOURNAL_STREAM=8:15603 RUNTIME_DIRECTORY=/run/systemd/netif SYSTEMD_EXEC_PID=1432
root        1442  0.0  0.3 281024  3536 ?        Ssl  13:22   0:00 /usr/sbin/gssproxy -D LANG=C.UTF-8 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin PIDFILE=/run/gssproxy.pid INVOCATION_ID=d39eb341d4144955af8c8754c987f423 JOURNAL_STREAM=8:15665 SYSTEMD_EXEC_PID=1436 KRB5RCACHEDIR=/var/lib/gssproxy/rcache
root        1450  0.1  1.0  17404  9776 ?        Ss   13:22   0:00 /usr/lib/systemd/systemd-logind LANG=C.UTF-8 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin NOTIFY_SOCKET=/run/systemd/notify INVOCATION_ID=0604363dcc3f4f7ca1c43608aada0045 JOURNAL_STREAM=8:15705 RUNTIME_DIRECTORY=/run/systemd/inhibit:/run/systemd/seats:/run/systemd/sessions:/run/systemd/shutdown:/run/systemd/users STATE_DIRECTORY=/var/lib/systemd/linger SYSTEMD_EXEC_PID=1450 SYSTEMD_REBOOT_TO_BOOT_LOADER_MENU=true
root        1620  0.0  0.8  29120  7624 ?        Ss   13:22   0:00 sshd: /usr/sbin/sshd -D [listener] 0 of 10-100 startups hd -D [listener] 0 of 10-100 startups                                                                                                                 0
root        1626  0.0  0.2  20544  2632 ?        Ss   13:22   0:00 /usr/sbin/atd -f LANG=C.UTF-8 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin INVOCATION_ID=46c8b58e954b4f6cb41706110562f7de JOURNAL_STREAM=8:16765 SYSTEMD_EXEC_PID=1626
root        1627  0.0  0.1 221344  1068 tty1     Ss+  13:22   0:00 /sbin/agetty -o -p -- \u --noclear - linux PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin INVOCATION_ID=73649ba826d84157bcb3d43842b1d7f6 TERM=linux SYSTEMD_EXEC_PID=1627
root        1628  0.0  0.1 221388  1068 ttyS0    Ss+  13:22   0:00 /sbin/agetty -o -p -- \u --keep-baud 115200,57600,38400,9600 - vt220 LANG=C.UTF-8 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin INVOCATION_ID=68b0fb1dde5e4ff1b44776603b789fe8 TERM=vt220 SYSTEMD_EXEC_PID=1628
chrony      1652  0.0  0.3  95552  3124 ?        S    13:22   0:00 /usr/sbin/chronyd -F 2 LANG=C.UTF-8 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin PIDFILE=/run/chrony/chronyd.pid INVOCATION_ID=4a1a54c5e99147d783f62141887768d3 JOURNAL_STREAM=8:16872 SYSTEMD_EXEC_PID=1648 OPTIONS=-F 2 USE_AMAZON_NTP_POOL=yes
root        1658  1.6  4.0 270332 37772 ?        Ss   13:22   0:00 /usr/bin/python3 /usr/bin/cloud-init modules --mode=final LANG=C.UTF-8 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin INVOCATION_ID=f7834a33f461418882d352ac4a1dc682 TERM=vt220 JOURNAL_STREAM=8:16223 SYSTEMD_EXEC_PID=1658
root        1664  0.0  0.1 221364  1000 ?        S    13:22   0:00  \_ tee -a /var/log/cloud-init-output.log PWD=/ SYSTEMD_EXEC_PID=1658 LANG=C.UTF-8 INVOCATION_ID=f7834a33f461418882d352ac4a1dc682 TERM=vt220 SHLVL=0 JOURNAL_STREAM=8:16223 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin _=/usr/bin/tee
root        1665  0.0  0.4 232040  3716 ?        S    13:22   0:00  \_ /bin/bash /var/lib/cloud/instance/scripts/part-001 LANG=C.UTF-8 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin INVOCATION_ID=f7834a33f461418882d352ac4a1dc682 TERM=vt220 JOURNAL_STREAM=8:16223 SYSTEMD_EXEC_PID=1658
root        1934  0.0  0.3 232680  2912 ?        R    13:23   0:00      \_ ps auxfe PWD=/ SYSTEMD_EXEC_PID=1658 LANG=C.UTF-8 INVOCATION_ID=f7834a33f461418882d352ac4a1dc682 TERM=vt220 SHLVL=1 JOURNAL_STREAM=8:16223 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin _=/usr/bin/ps
root        1684  0.5  2.6 732440 24700 ?        Sl   13:22   0:00 /usr/bin/ssm-document-worker 5979e56e-7bb1-4f40-a1aa-e8fcc4d205ca LANG=C.UTF-8 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin INVOCATION_ID=6452c5c1b3db4ff7be783efa0051fcb4 JOURNAL_STREAM=8:16720 SYSTEMD_EXEC_PID=1615
root        1714  0.0  0.4 232168  3736 ?        S    13:22   0:00  \_ /bin/bash /var/lib/amazon/ssm/i-02d890bb3c0ca3a27/document/orchestration/5979e56e-7bb1-4f40-a1aa-e8fcc4d205ca/invokeInspectorSsmPluginLinux/_script.sh AWS_SSM_INSTANCE_ID=i-02d890bb3c0ca3a27 SSM_COMMAND_ID=5979e56e-7bb1-4f40-a1aa-e8fcc4d205ca AWS_SSM_REGION_NAME=us-east-1 AWS_SSM_PLATFORM_VERSION=2023 PWD=/usr/bin SYSTEMD_EXEC_PID=1615 LANG=C.UTF-8 INVOCATION_ID=6452c5c1b3db4ff7be783efa0051fcb4 SHLVL=0 AWS_SSM_PLATFORM_NAME=Amazon Linux JOURNAL_STREAM=8:16720 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin _=/var/lib/amazon/ssm/i-02d890bb3c0ca3a27/document/orchestration/5979e56e-7bb1-4f40-a1aa-e8fcc4d205ca/invokeInspectorSsmPluginLinux/_script.sh
root        1723  0.0  0.1 221360  1004 ?        S    13:22   0:00      \_ sleep 60 AWS_SSM_INSTANCE_ID=i-02d890bb3c0ca3a27 SSM_COMMAND_ID=5979e56e-7bb1-4f40-a1aa-e8fcc4d205ca AWS_SSM_REGION_NAME=us-east-1 AWS_SSM_PLATFORM_VERSION=2023 PWD=/usr/bin SYSTEMD_EXEC_PID=1615 LANG=C.UTF-8 INVOCATION_ID=6452c5c1b3db4ff7be783efa0051fcb4 SHLVL=1 AWS_SSM_PLATFORM_NAME=Amazon Linux JOURNAL_STREAM=8:16720 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin _=/usr/bin/sleep
root        1706  7.0  2.9 732696 27636 ?        Sl   13:22   0:01 /usr/bin/ssm-document-worker 6778b6bf-81cf-4605-9770-022f0e3af205.2024-04-27T13-22-59.194Z LANG=C.UTF-8 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin INVOCATION_ID=6452c5c1b3db4ff7be783efa0051fcb4 JOURNAL_STREAM=8:16720 SYSTEMD_EXEC_PID=1615
root        1724  3.7  2.6 1710660 24624 ?       Sl   13:23   0:00 /var/lib/amazon/ssm/update/amazon-ssm-agent-updater/3.3.337.0/updater -update -source.version 3.2.2222.0 -target.version None -package.name amazon-ssm-agent -messageid aws.ssm.ee63f3a8-ddf0-4086-9d8d-46ad8a389d54.i-02d890bb3c0ca3a27 -stdout stdout -stderr stderr -output.key ee63f3a8-ddf0-4086-9d8d-46ad8a389d54/i-02d890bb3c0ca3a27/awsupdateSsmAgent -manifest.url https://s3.{Region}.amazonaws.com/amazon-ssm-{Region}/ssm-agent-manifest.json -upstream.service.name MessageGatewayService -disable.downgrade LANG=C.UTF-8 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin INVOCATION_ID=6452c5c1b3db4ff7be783efa0051fcb4 JOURNAL_STREAM=8:16720 SYSTEMD_EXEC_PID=1615
root        1746  0.0  0.4 232164  3880 ?        S    13:23   0:00  \_ /bin/bash /var/lib/amazon/ssm/update/amazon-ssm-agent/3.3.337.0/install.sh LANG=C.UTF-8 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin INVOCATION_ID=6452c5c1b3db4ff7be783efa0051fcb4 JOURNAL_STREAM=8:16720 SYSTEMD_EXEC_PID=1615 PWD=/var/lib/amazon/ssm/update/amazon-ssm-agent/3.3.337.0
root        1898  0.0  0.2 232164  1988 ?        S    13:23   0:00      \_ /bin/bash /var/lib/amazon/ssm/update/amazon-ssm-agent/3.3.337.0/install.sh LANG=C.UTF-8 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin INVOCATION_ID=6452c5c1b3db4ff7be783efa0051fcb4 JOURNAL_STREAM=8:16720 SYSTEMD_EXEC_PID=1615 PWD=/var/lib/amazon/ssm/update/amazon-ssm-agent/3.3.337.0
root        1899 74.3  1.9 256472 18036 ?        R    13:23   0:02          \_ rpm -U amazon-ssm-agent.rpm PWD=/var/lib/amazon/ssm/update/amazon-ssm-agent/3.3.337.0 SYSTEMD_EXEC_PID=1615 LANG=C.UTF-8 INVOCATION_ID=6452c5c1b3db4ff7be783efa0051fcb4 SHLVL=1 JOURNAL_STREAM=8:16720 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin _=/usr/bin/rpm
+ grep rpm
+ ps -ef
root        1899    1898 74 13:23 ?        00:00:02 rpm -U amazon-ssm-agent.rpm
root        1936    1665  0 13:23 ?        00:00:00 grep rpm
+ retries=1
+ [[ 1 > 5 ]]
+ echo 'Command execution failed. Retrying attempt 1...'
Command execution failed. Retrying attempt 1...
+ sleep 5
+ dnf upgrade -y --releasever=latest
Last metadata expiration check: 0:00:19 ago on Sat Apr 27 13:23:04 2024.
Dependencies resolved.
================================================================================
 Package                    Arch   Version                    Repository   Size
================================================================================
Installing:
 kernel                     x86_64 6.1.84-99.169.amzn2023     amazonlinux  31 M
.
.
(中略)
.
.
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
RPM: error: can't create transaction lock on /var/lib/rpm/.rpm.lock (Resource temporarily unavailable)
The downloaded packages were saved in cache until the next successful transaction.
You can remove cached packages by executing 'dnf clean packages'.
Error: Could not run transaction.
+ ls -a /var/lib/rpm/
.
..
.rpm.lock
rpmdb.sqlite
rpmdb.sqlite-shm
rpmdb.sqlite-wal
+ file /var/lib/rpm/.rpm.lock
/var/lib/rpm/.rpm.lock: empty
+ ps auxfe
USER         PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root           2  0.0  0.0      0     0 ?        S    13:22   0:00 [kthreadd]
root           3  0.0  0.0      0     0 ?        I<   13:22   0:00  \_ [rcu_gp]
root           4  0.0  0.0      0     0 ?        I<   13:22   0:00  \_ [rcu_par_gp]
root           5  0.0  0.0      0     0 ?        I<   13:22   0:00  \_ [slub_flushwq]
root           6  0.0  0.0      0     0 ?        I<   13:22   0:00  \_ [netns]
root           7  0.0  0.0      0     0 ?        I    13:22   0:00  \_ [kworker/0:0-xfs-conv/nvme0n1p1]
root           8  0.0  0.0      0     0 ?        I<   13:22   0:00  \_ [kworker/0:0H-events_highpri]
root           9  0.0  0.0      0     0 ?        I    13:22   0:00  \_ [kworker/u4:0-writeback]
root          10  0.0  0.0      0     0 ?        I<   13:22   0:00  \_ [mm_percpu_wq]
root          11  0.0  0.0      0     0 ?        I    13:22   0:00  \_ [rcu_tasks_kthread]
root          12  0.0  0.0      0     0 ?        I    13:22   0:00  \_ [rcu_tasks_rude_kthread]
root          13  0.0  0.0      0     0 ?        I    13:22   0:00  \_ [rcu_tasks_trace_kthread]
root          14  0.0  0.0      0     0 ?        S    13:22   0:00  \_ [ksoftirqd/0]
root          15  0.0  0.0      0     0 ?        I    13:22   0:00  \_ [rcu_preempt]
root          16  0.0  0.0      0     0 ?        S    13:22   0:00  \_ [migration/0]
root          17  0.0  0.0      0     0 ?        I    13:22   0:00  \_ [kworker/0:1-xfs-buf/nvme0n1p1]
root          18  0.0  0.0      0     0 ?        S    13:22   0:00  \_ [cpuhp/0]
root          19  0.0  0.0      0     0 ?        S    13:22   0:00  \_ [cpuhp/1]
root          20  0.0  0.0      0     0 ?        S    13:22   0:00  \_ [migration/1]
root          21  0.0  0.0      0     0 ?        S    13:22   0:00  \_ [ksoftirqd/1]
root          22  0.0  0.0      0     0 ?        I    13:22   0:00  \_ [kworker/1:0-xfs-inodegc/nvme0n1p1]
root          23  0.0  0.0      0     0 ?        I<   13:22   0:00  \_ [kworker/1:0H-events_highpri]
root          25  0.2  0.0      0     0 ?        I    13:22   0:00  \_ [kworker/u4:1-flush-259:0]
root          26  0.0  0.0      0     0 ?        S    13:22   0:00  \_ [kdevtmpfs]
root          27  0.0  0.0      0     0 ?        I<   13:22   0:00  \_ [inet_frag_wq]
root          28  0.0  0.0      0     0 ?        S    13:22   0:00  \_ [kauditd]
root          29  0.0  0.0      0     0 ?        S    13:22   0:00  \_ [khungtaskd]
root          30  0.0  0.0      0     0 ?        S    13:22   0:00  \_ [oom_reaper]
root          31  0.0  0.0      0     0 ?        I    13:22   0:00  \_ [kworker/u4:2-flush-259:0]
root          32  0.0  0.0      0     0 ?        I<   13:22   0:00  \_ [writeback]
root          33  0.0  0.0      0     0 ?        S    13:22   0:00  \_ [kcompactd0]
root          34  0.0  0.0      0     0 ?        SN   13:22   0:00  \_ [khugepaged]
root          35  0.0  0.0      0     0 ?        I<   13:22   0:00  \_ [kintegrityd]
root          36  0.0  0.0      0     0 ?        I<   13:22   0:00  \_ [kblockd]
root          37  0.0  0.0      0     0 ?        I<   13:22   0:00  \_ [blkcg_punt_bio]
root          38  0.0  0.0      0     0 ?        I    13:22   0:00  \_ [kworker/1:1-events]
root          39  0.0  0.0      0     0 ?        I<   13:22   0:00  \_ [tpm_dev_wq]
root          40  0.0  0.0      0     0 ?        I<   13:22   0:00  \_ [md]
root          41  0.0  0.0      0     0 ?        I<   13:22   0:00  \_ [edac-poller]
root          42  0.0  0.0      0     0 ?        S    13:22   0:00  \_ [watchdogd]
root          43  0.0  0.0      0     0 ?        I<   13:22   0:00  \_ [kworker/0:1H-xfs-log/nvme0n1p1]
root          66  0.0  0.0      0     0 ?        S    13:22   0:00  \_ [kswapd0]
root          67  0.0  0.0      0     0 ?        I<   13:22   0:00  \_ [xfsalloc]
root          70  0.0  0.0      0     0 ?        I<   13:22   0:00  \_ [xfs_mru_cache]
root          73  0.0  0.0      0     0 ?        I<   13:22   0:00  \_ [kthrotld]
root          76  0.0  0.0      0     0 ?        I    13:22   0:00  \_ [kworker/0:2-events]
root         120  0.0  0.0      0     0 ?        I<   13:22   0:00  \_ [nvme-wq]
root         122  0.0  0.0      0     0 ?        I<   13:22   0:00  \_ [nvme-reset-wq]
root         124  0.0  0.0      0     0 ?        I<   13:22   0:00  \_ [nvme-delete-wq]
root         130  0.0  0.0      0     0 ?        I    13:22   0:00  \_ [kworker/u4:3-flush-259:0]
root         131  0.0  0.0      0     0 ?        I<   13:22   0:00  \_ [mld]
root         132  0.0  0.0      0     0 ?        I    13:22   0:00  \_ [kworker/u4:4-events_unbound]
root         133  0.0  0.0      0     0 ?        I<   13:22   0:00  \_ [ipv6_addrconf]
root         153  0.0  0.0      0     0 ?        I    13:22   0:00  \_ [kworker/u4:5-writeback]
root         169  0.0  0.0      0     0 ?        I<   13:22   0:00  \_ [kstrp]
root         179  0.0  0.0      0     0 ?        I<   13:22   0:00  \_ [zswap-shrink]
root         180  0.0  0.0      0     0 ?        I<   13:22   0:00  \_ [kworker/u5:0]
root         235  0.0  0.0      0     0 ?        I    13:22   0:00  \_ [kworker/1:2-cgroup_destroy]
root         257  0.0  0.0      0     0 ?        I<   13:22   0:00  \_ [kworker/1:1H-xfs-log/nvme0n1p1]
root         717  0.0  0.0      0     0 ?        I<   13:22   0:00  \_ [xfs-buf/nvme0n1]
root         719  0.0  0.0      0     0 ?        I<   13:22   0:00  \_ [xfs-conv/nvme0n]
root         722  0.0  0.0      0     0 ?        I<   13:22   0:00  \_ [xfs-reclaim/nvm]
root         723  0.0  0.0      0     0 ?        I<   13:22   0:00  \_ [xfs-blockgc/nvm]
root         724  0.0  0.0      0     0 ?        I<   13:22   0:00  \_ [xfs-inodegc/nvm]
root         726  0.0  0.0      0     0 ?        I<   13:22   0:00  \_ [xfs-log/nvme0n1]
root         727  0.0  0.0      0     0 ?        I<   13:22   0:00  \_ [xfs-cil/nvme0n1]
root         728  0.0  0.0      0     0 ?        S    13:22   0:00  \_ [xfsaild/nvme0n1p1]
root         733  0.0  0.0      0     0 ?        I    13:22   0:00  \_ [kworker/1:3-rcu_gp]
root        1168  0.0  0.0      0     0 ?        I    13:22   0:00  \_ [kworker/1:4-events]
root        1188  0.0  0.0      0     0 ?        I    13:22   0:00  \_ [kworker/0:3-xfs-buf/nvme0n1p1]
root        1215  0.0  0.0      0     0 ?        I<   13:22   0:00  \_ [rpciod]
root        1216  0.0  0.0      0     0 ?        I<   13:22   0:00  \_ [xprtiod]
root        1273  0.0  0.0      0     0 ?        I<   13:22   0:00  \_ [cryptd]
root        1296  0.0  0.0      0     0 ?        I<   13:22   0:00  \_ [ena]
root        2008  0.0  0.0      0     0 ?        I    13:23   0:00  \_ [kworker/u4:6]
root           1  3.0  1.8 105392 16832 ?        Ss   13:22   0:01 /usr/lib/systemd/systemd --switched-root --system --deserialize=32 TERM=vt220 BOOT_IMAGE=(hd0,gpt1)/boot/vmlinuz-6.1.79-99.164.amzn2023.x86_64
root         775  1.1  1.3  34452 12116 ?        Ss   13:22   0:00 /usr/lib/systemd/systemd-journald LANG=C.UTF-8 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin NOTIFY_SOCKET=/run/systemd/notify LISTEN_PID=775 LISTEN_FDS=4 LISTEN_FDNAMES=systemd-journald-dev-log.socket:systemd-journald-audit.socket:systemd-journald.socket:systemd-journald.socket INVOCATION_ID=863579a1574a4c6d801abfa4c16cb312 RUNTIME_DIRECTORY=/run/systemd/journal SYSTEMD_EXEC_PID=775
root        1186  0.1  1.1  30596 10712 ?        Ss   13:22   0:00 /usr/lib/systemd/systemd-udevd LANG=C.UTF-8 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin NOTIFY_SOCKET=/run/systemd/notify LISTEN_PID=1186 LISTEN_FDS=2 LISTEN_FDNAMES=systemd-udevd-control.socket:systemd-udevd-kernel.socket INVOCATION_ID=627d5249b5f448c0a166268c3682aafd JOURNAL_STREAM=8:13444 SYSTEMD_EXEC_PID=1186
systemd+    1190  0.2  1.5  21204 14432 ?        Ss   13:22   0:00 /usr/lib/systemd/systemd-resolved LANG=C.UTF-8 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin NOTIFY_SOCKET=/run/systemd/notify LOGNAME=systemd-resolve USER=systemd-resolve INVOCATION_ID=410128edef5744bcb3ef35357716bb6e JOURNAL_STREAM=8:13511 RUNTIME_DIRECTORY=/run/systemd/resolve SYSTEMD_EXEC_PID=1190
root        1211  0.0  0.2  29260  2432 ?        S<sl 13:22   0:00 /sbin/auditd LANG=C.UTF-8 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin PIDFILE=/run/auditd.pid INVOCATION_ID=d921312bb0024dd99544edf5f91c7400 JOURNAL_STREAM=8:14500 SYSTEMD_EXEC_PID=1187
root        1418  0.0  0.6  15292  6480 ?        Ss   13:22   0:00 /usr/bin/systemd-inhibit --what=handle-suspend-key:handle-hibernate-key --who=noah --why=acpid instead --mode=block /usr/sbin/acpid -fLANG=C.UTF-8 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin INVOCATION_ID=679c314b7af24558b154b89801bdeaa3 SYSTEMD_EXEC_PID=1418 OPTIONS=
root        1466  0.0  0.1   2668  1132 ?        S    13:22   0:00  \_ /usr/sbin/acpid -f LANG=C.UTF-8 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin INVOCATION_ID=679c314b7af24558b154b89801bdeaa3 SYSTEMD_EXEC_PID=1418 OPTIONS=
root        1420  0.0  0.1  81344  1552 ?        Ssl  13:22   0:00 /usr/sbin/irqbalance --foreground LANG=C.UTF-8 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin INVOCATION_ID=e55e5897287d41269f6c9d9f6743e2b2 JOURNAL_STREAM=8:14862 RUNTIME_DIRECTORY=/run/irqbalance SYSTEMD_EXEC_PID=1420
libstor+    1421  0.0  0.2   2752  2036 ?        Ss   13:22   0:00 /usr/bin/lsmd -d LANG=C.UTF-8 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin HOME=/root LOGNAME=root USER=root SHELL=/bin/bashINVOCATION_ID=f9a483acf59c44e78d2f4bb259983691 JOURNAL_STREAM=8:15583 SYSTEMD_EXEC_PID=1421
root        1423 79.0  0.7 164928  6896 ?        Ssl  13:22   0:37 /usr/sbin/rngd -f -x pkcs11 -x nist LANG=C.UTF-8 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin INVOCATION_ID=c25c43ad1daa4e84be69801cc6b9aa72 JOURNAL_STREAM=8:14882 SYSTEMD_EXEC_PID=1423 RNGD_ARGS=-x pkcs11 -x nist
root        1424  0.0  1.1 240056 10264 ?        Ss   13:22   0:00 /usr/sbin/sssd -i --logger=files LANG=C.UTF-8 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin NOTIFY_SOCKET=/run/systemd/notifyPIDFILE=/run/sssd.pid INVOCATION_ID=78d3feb5201540bcbe0361f06c40d9d8 JOURNAL_STREAM=8:14888 SYSTEMD_EXEC_PID=1424 DEBUG_LOGGER=--logger=files
root        1448  0.5  1.3 243700 12508 ?        S    13:22   0:00  \_ /usr/libexec/sssd/sssd_be --domain implicit_files --uid 0 --gid 0 --logger=files LANG=C.UTF-8 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin NOTIFY_SOCKET=/run/systemd/notify PIDFILE=/run/sssd.pid INVOCATION_ID=78d3feb5201540bcbe0361f06c40d9d8 JOURNAL_STREAM=8:14888 SYSTEMD_EXEC_PID=1424 DEBUG_LOGGER=--logger=files _SSS_LOOPS=NO KRB5RCACHEDIR=/var/cache/krb5rcache
root        1449  0.2  4.2 267456 39080 ?        S    13:22   0:00  \_ /usr/libexec/sssd/sssd_nss --uid 0 --gid 0 --logger=files LANG=C.UTF-8 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin NOTIFY_SOCKET=/run/systemd/notify PIDFILE=/run/sssd.pid INVOCATION_ID=78d3feb5201540bcbe0361f06c40d9d8 JOURNAL_STREAM=8:14888 SYSTEMD_EXEC_PID=1424 DEBUG_LOGGER=--logger=files _SSS_LOOPS=NO KRB5RCACHEDIR=/var/cache/krb5rcache
root        1428  0.0  0.8  15632  7588 ?        Ss   13:22   0:00 /usr/lib/systemd/systemd-homed LANG=C.UTF-8 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin INVOCATION_ID=874d89e138b34fcab6a391a6908aed55 JOURNAL_STREAM=8:15590 STATE_DIRECTORY=/var/lib/systemd/home SYSTEMD_EXEC_PID=1428
dbus        1431  0.0  0.3   8372  3476 ?        Ss   13:22   0:00 /usr/bin/dbus-broker-launch --scope system --audit LANG=C.UTF-8 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin NOTIFY_SOCKET=/run/systemd/notify LISTEN_PID=1431 LISTEN_FDS=1 LISTEN_FDNAMES=dbus.socket SYSTEMD_NSS_DYNAMIC_BYPASS=1 INVOCATION_ID=0bd58a2a43f94a4092305de7f07c50db JOURNAL_STREAM=8:14904 SYSTEMD_EXEC_PID=1431
dbus        1437  0.1  0.3   5264  2840 ?        S    13:22   0:00  \_ dbus-broker --log 4 --controller 9 --machine-id ec22c82166c220293dd9e2defaa7755c --max-bytes 536870912 --max-fds 4096 --max-matches 16384 --audit LANG=C.UTF-8 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin NOTIFY_SOCKET=/run/systemd/notify SYSTEMD_NSS_DYNAMIC_BYPASS=1 INVOCATION_ID=0bd58a2a43f94a4092305de7f07c50db JOURNAL_STREAM=8:14904 SYSTEMD_EXEC_PID=1431
systemd+    1432  0.1  1.0 235888  9804 ?        Ss   13:22   0:00 /usr/lib/systemd/systemd-networkd LANG=C.UTF-8 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin NOTIFY_SOCKET=/run/systemd/notify LISTEN_PID=1432 LISTEN_FDS=1 LISTEN_FDNAMES=systemd-networkd.socket LOGNAME=systemd-network USER=systemd-network INVOCATION_ID=68ba8ab4689f4953a68115c38a4e9ca3 JOURNAL_STREAM=8:15603 RUNTIME_DIRECTORY=/run/systemd/netif SYSTEMD_EXEC_PID=1432
root        1442  0.0  0.3 281024  3536 ?        Ssl  13:22   0:00 /usr/sbin/gssproxy -D LANG=C.UTF-8 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin PIDFILE=/run/gssproxy.pid INVOCATION_ID=d39eb341d4144955af8c8754c987f423 JOURNAL_STREAM=8:15665 SYSTEMD_EXEC_PID=1436 KRB5RCACHEDIR=/var/lib/gssproxy/rcache
root        1450  0.1  1.0  17404  9776 ?        Ss   13:22   0:00 /usr/lib/systemd/systemd-logind LANG=C.UTF-8 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin NOTIFY_SOCKET=/run/systemd/notify INVOCATION_ID=0604363dcc3f4f7ca1c43608aada0045 JOURNAL_STREAM=8:15705 RUNTIME_DIRECTORY=/run/systemd/inhibit:/run/systemd/seats:/run/systemd/sessions:/run/systemd/shutdown:/run/systemd/users STATE_DIRECTORY=/var/lib/systemd/linger SYSTEMD_EXEC_PID=1450 SYSTEMD_REBOOT_TO_BOOT_LOADER_MENU=true
root        1620  0.0  0.8  29120  7624 ?        Ss   13:22   0:00 sshd: /usr/sbin/sshd -D [listener] 0 of 10-100 startups hd -D [listener] 0 of 10-100 startups                                                                                                                 0
root        1626  0.0  0.2  20544  2632 ?        Ss   13:22   0:00 /usr/sbin/atd -f LANG=C.UTF-8 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin INVOCATION_ID=46c8b58e954b4f6cb41706110562f7de JOURNAL_STREAM=8:16765 SYSTEMD_EXEC_PID=1626
root        1627  0.0  0.1 221344  1068 tty1     Ss+  13:22   0:00 /sbin/agetty -o -p -- \u --noclear - linux PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin INVOCATION_ID=73649ba826d84157bcb3d43842b1d7f6 TERM=linux SYSTEMD_EXEC_PID=1627
root        1628  0.0  0.1 221388  1068 ttyS0    Ss+  13:22   0:00 /sbin/agetty -o -p -- \u --keep-baud 115200,57600,38400,9600 - vt220 LANG=C.UTF-8 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin INVOCATION_ID=68b0fb1dde5e4ff1b44776603b789fe8 TERM=vt220 SYSTEMD_EXEC_PID=1628
chrony      1652  0.0  0.3  95552  3124 ?        S    13:22   0:00 /usr/sbin/chronyd -F 2 LANG=C.UTF-8 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin PIDFILE=/run/chrony/chronyd.pid INVOCATION_ID=4a1a54c5e99147d783f62141887768d3 JOURNAL_STREAM=8:16872 SYSTEMD_EXEC_PID=1648 OPTIONS=-F 2 USE_AMAZON_NTP_POOL=yes
root        1658  1.2  4.0 270332 37392 ?        Ss   13:22   0:00 /usr/bin/python3 /usr/bin/cloud-init modules --mode=final LANG=C.UTF-8 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin INVOCATION_ID=f7834a33f461418882d352ac4a1dc682 TERM=vt220 JOURNAL_STREAM=8:16223 SYSTEMD_EXEC_PID=1658
root        1664  0.0  0.1 221364   992 ?        S    13:22   0:00  \_ tee -a /var/log/cloud-init-output.log PWD=/ SYSTEMD_EXEC_PID=1658 LANG=C.UTF-8 INVOCATION_ID=f7834a33f461418882d352ac4a1dc682 TERM=vt220 SHLVL=0 JOURNAL_STREAM=8:16223 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin _=/usr/bin/tee
root        1665  0.0  0.4 232040  3720 ?        S    13:22   0:00  \_ /bin/bash /var/lib/cloud/instance/scripts/part-001 LANG=C.UTF-8 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin INVOCATION_ID=f7834a33f461418882d352ac4a1dc682 TERM=vt220 JOURNAL_STREAM=8:16223 SYSTEMD_EXEC_PID=1658
root        2121  0.0  0.3 232680  2908 ?        R    13:23   0:00      \_ ps auxfe PWD=/ SYSTEMD_EXEC_PID=1658 LANG=C.UTF-8 INVOCATION_ID=f7834a33f461418882d352ac4a1dc682 TERM=vt220 SHLVL=1 JOURNAL_STREAM=8:16223 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin _=/usr/bin/ps
root        1684  0.3  2.6 732440 24700 ?        Sl   13:22   0:00 /usr/bin/ssm-document-worker 5979e56e-7bb1-4f40-a1aa-e8fcc4d205ca LANG=C.UTF-8 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin INVOCATION_ID=6452c5c1b3db4ff7be783efa0051fcb4 JOURNAL_STREAM=8:16720 SYSTEMD_EXEC_PID=1615
root        1714  0.0  0.4 232168  3736 ?        S    13:22   0:00  \_ /bin/bash /var/lib/amazon/ssm/i-02d890bb3c0ca3a27/document/orchestration/5979e56e-7bb1-4f40-a1aa-e8fcc4d205ca/invokeInspectorSsmPluginLinux/_script.sh AWS_SSM_INSTANCE_ID=i-02d890bb3c0ca3a27 SSM_COMMAND_ID=5979e56e-7bb1-4f40-a1aa-e8fcc4d205ca AWS_SSM_REGION_NAME=us-east-1 AWS_SSM_PLATFORM_VERSION=2023 PWD=/usr/bin SYSTEMD_EXEC_PID=1615 LANG=C.UTF-8 INVOCATION_ID=6452c5c1b3db4ff7be783efa0051fcb4 SHLVL=0 AWS_SSM_PLATFORM_NAME=Amazon Linux JOURNAL_STREAM=8:16720 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin _=/var/lib/amazon/ssm/i-02d890bb3c0ca3a27/document/orchestration/5979e56e-7bb1-4f40-a1aa-e8fcc4d205ca/invokeInspectorSsmPluginLinux/_script.sh
root        1723  0.0  0.1 221360  1004 ?        S    13:22   0:00      \_ sleep 60 AWS_SSM_INSTANCE_ID=i-02d890bb3c0ca3a27 SSM_COMMAND_ID=5979e56e-7bb1-4f40-a1aa-e8fcc4d205ca AWS_SSM_REGION_NAME=us-east-1 AWS_SSM_PLATFORM_VERSION=2023 PWD=/usr/bin SYSTEMD_EXEC_PID=1615 LANG=C.UTF-8 INVOCATION_ID=6452c5c1b3db4ff7be783efa0051fcb4 SHLVL=1 AWS_SSM_PLATFORM_NAME=Amazon Linux JOURNAL_STREAM=8:16720 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin _=/usr/bin/sleep
root        1706  4.7  2.9 732696 27636 ?        Sl   13:22   0:01 /usr/bin/ssm-document-worker 6778b6bf-81cf-4605-9770-022f0e3af205.2024-04-27T13-22-59.194Z LANG=C.UTF-8 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin INVOCATION_ID=6452c5c1b3db4ff7be783efa0051fcb4 JOURNAL_STREAM=8:16720 SYSTEMD_EXEC_PID=1615
root        1724  2.4  2.6 1710660 24624 ?       Sl   13:23   0:00 /var/lib/amazon/ssm/update/amazon-ssm-agent-updater/3.3.337.0/updater -update -source.version 3.2.2222.0 -target.version None -package.name amazon-ssm-agent -messageid aws.ssm.ee63f3a8-ddf0-4086-9d8d-46ad8a389d54.i-02d890bb3c0ca3a27 -stdout stdout -stderr stderr -output.key ee63f3a8-ddf0-4086-9d8d-46ad8a389d54/i-02d890bb3c0ca3a27/awsupdateSsmAgent -manifest.url https://s3.{Region}.amazonaws.com/amazon-ssm-{Region}/ssm-agent-manifest.json -upstream.service.name MessageGatewayService -disable.downgrade LANG=C.UTF-8 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin INVOCATION_ID=6452c5c1b3db4ff7be783efa0051fcb4 JOURNAL_STREAM=8:16720 SYSTEMD_EXEC_PID=1615
root        1746  0.0  0.4 232164  3880 ?        S    13:23   0:00  \_ /bin/bash /var/lib/amazon/ssm/update/amazon-ssm-agent/3.3.337.0/install.sh LANG=C.UTF-8 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin INVOCATION_ID=6452c5c1b3db4ff7be783efa0051fcb4 JOURNAL_STREAM=8:16720 SYSTEMD_EXEC_PID=1615 PWD=/var/lib/amazon/ssm/update/amazon-ssm-agent/3.3.337.0
root        1898  0.0  0.2 232164  1988 ?        S    13:23   0:00      \_ /bin/bash /var/lib/amazon/ssm/update/amazon-ssm-agent/3.3.337.0/install.sh LANG=C.UTF-8 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin INVOCATION_ID=6452c5c1b3db4ff7be783efa0051fcb4 JOURNAL_STREAM=8:16720 SYSTEMD_EXEC_PID=1615 PWD=/var/lib/amazon/ssm/update/amazon-ssm-agent/3.3.337.0
root        1899 30.7  1.8 255356 16920 ?        S    13:23   0:03          \_ rpm -U amazon-ssm-agent.rpm PWD=/var/lib/amazon/ssm/update/amazon-ssm-agent/3.3.337.0 SYSTEMD_EXEC_PID=1615 LANG=C.UTF-8 INVOCATION_ID=6452c5c1b3db4ff7be783efa0051fcb4 SHLVL=1 JOURNAL_STREAM=8:16720 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin _=/usr/bin/rpm
root        2009  0.0  0.3 232040  3416 ?        S    13:23   0:00              \_ /bin/sh /var/tmp/rpm-tmp.jRIlSp 0 PWD=/var/lib/amazon/ssm/update/amazon-ssm-agent/3.3.337.0 SYSTEMD_EXEC_PID=1615 LANG=C.UTF-8 INVOCATION_ID=6452c5c1b3db4ff7be783efa0051fcb4 SHLVL=1 JOURNAL_STREAM=8:16720 PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin _=/usr/bin/rpm
root        2010  0.0  0.4 232164  3796 ?        S    13:23   0:00                  \_ /usr/bin/bash /usr/lib/systemd/systemd-update-helper system-reload-restart PWD=/ SYSTEMD_EXEC_PID=1615 _=/usr/lib/systemd/systemd-update-helper LANG=C.UTF-8 INVOCATION_ID=6452c5c1b3db4ff7be783efa0051fcb4 SHLVL=2 JOURNAL_STREAM=8:16720 PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin
root        2036  0.0  0.6 234276  5912 ?        S    13:23   0:00                      \_ systemctl reload-or-restart --marked PWD=/ SYSTEMD_EXEC_PID=1615 LANG=C.UTF-8 INVOCATION_ID=6452c5c1b3db4ff7be783efa0051fcb4 SHLVL=3 JOURNAL_STREAM=8:16720 PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin _=/bin/systemctl
root        1972  1.0  2.2 1772420 21016 ?       Ssl  13:23   0:00 /usr/bin/amazon-ssm-agent LANG=C.UTF-8 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin INVOCATION_ID=1b18d6e6da9640798795579a4b1e0fea JOURNAL_STREAM=8:19891 SYSTEMD_EXEC_PID=1972
root        2038  1.8  0.0      0     0 ?        Z    13:23   0:00  \_ [ssm-agent-worke] <defunct>
+ grep rpm
+ ps -ef
root        1899    1898 30 13:23 ?        00:00:03 rpm -U amazon-ssm-agent.rpm
root        2009    1899  0 13:23 ?        00:00:00 /bin/sh /var/tmp/rpm-tmp.jRIlSp 0
root        2123    1665  0 13:23 ?        00:00:00 grep rpm
+ retries=2
+ [[ 2 > 5 ]]
+ echo 'Command execution failed. Retrying attempt 2...'
Command execution failed. Retrying attempt 2...
+ sleep 5
+ dnf upgrade -y --releasever=latest
Last metadata expiration check: 0:00:28 ago on Sat Apr 27 13:23:04 2024.
Dependencies resolved.
================================================================================
 Package                    Arch   Version                    Repository   Size
================================================================================
Installing:
 kernel                     x86_64 6.1.84-99.169.amzn2023     amazonlinux  31 M
.
.
(中略)
.
.
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Running scriptlet: selinux-policy-targeted-37.22-1.amzn2023.0.2.noarch    1/1
  Preparing        :                                                        1/1
.
.
(中略)
.
.
  yum-4.14.0-1.amzn2023.0.4.noarch
Installed:
  kernel-6.1.84-99.169.amzn2023.x86_64
  libsss_sudo-2.9.4-1.amzn2023.0.1.x86_64
  python3-systemd-235-51.amzn2023.0.2.x86_64
  sssd-nfs-idmap-2.9.4-1.amzn2023.0.1.x86_64

Complete!
+ echo 'Command executed successfully.'
Command executed successfully.
+ return 0
Cloud-init v. 22.2.2 finished at Sat, 27 Apr 2024 13:24:23 +0000. Datasource DataSourceEc2.  Up 110.57 seconds

トランザクションロックができない間、rpm -U amazon-ssm-agent.rpmが動作しているようです。

該当時間のSSM Run Commandの実行履歴を確認すると、ee63f3a8-ddf0-4086-9d8d-46ad8a389d54というコマンドIDの実行が行われていました。

ee63f3a8-ddf0-4086-9d8d-46ad8a389d54

これはSSM Agentの自動アップデートが行われているためです。

Fleet Managerの設定を確認すると、SSM Agentの自動アップデートをが有効になっていました。どうやらSSM Agentの自動アップデートはEC2インスタンスを新規作成したタイミングにも実行されるようです。

エージェントの自動更新

ps auxfeの結果からrpm -U amazon-ssm-agent.rpmの親プロセスの環境変数に上述コマンドIDと一致するものがありました。

また、ユーザーデータの処理が一度も失敗せずに終了している場合においては、SSM Agentの自動アップデートがAnother update in progress, try again laterとして失敗していることが分かりました。

025ef553-6ead-4613-965b-65b5446c3081

Another update in progress, try again later

ということで、今回の事象はSSM Agentの自動アップデートが原因だと推測します。

3. (CloudFormation限定) cfn-signalで異常終了を検出し、スタックロールバック後に再度スタックをデプロイする

こちらは「失敗したら早めに気づけるようにしよう」というアプローチです。

cfn-signalを用いることで、ユーザーデータ内の処理の異常終了を検出することが可能です。

詳細は以下記事をご覧ください。

4. パッケージの更新やインストールをしたAMIを作成し、そのAMIを使ってEC2インスタンスを起動する

こちらは「そもそもユーザーデータでdnfやyumを使った処理を行わない」というアプローチです。

ゴールデンイメージを管理する手間は増えますが、ユーザーデータのスクリプトをシンプルにしたり、ユーザーデータの処理完了までを短くするメリットがあります。

ユーザーデータの処理が正常に完了したのかチェックする仕組みを導入しよう

EC2インスタンスのユーザーデータ内のdnfコマンドやyumコマンドが失敗する場合の緩和策を考えてみました。

ユーザーデータの処理が正常に完了したのかチェックする仕組みを導入することをお勧めします。cfn-sifnalでなくともユーザーデータの処理の異常終了をトラップして、EC2インスタンスを停止させたりなどをすると、問題のあるEC2インスタンスに気づきやすいのではないかと考えます。

また、リトライを繰り返すことで正常に成功する場合 かつ リトライすることによる副作用がない場合はリトライ処理を組み込むと良いでしょう。

この記事が誰かの助けになれば幸いです。

以上、AWS事業本部 コンサルティング部の のんピ(@non____97)でした!

この記事をシェアする

facebook logohatena logotwitter logo

© Classmethod, Inc. All rights reserved.